mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-01 09:42:45 +00:00
tests: skip docker,kata install with KATA_DEV_MODE
Skip installation of docker and kata packages when the environment variable KATA_DEV_MODE is not empty, as a dev system may be using a non standard setup. Fixes: #195 Signed-off-by: Marco Vedovati <mvedovati@suse.com>
This commit is contained in:
parent
9d74134bef
commit
eb92306c48
@ -7,10 +7,10 @@ osbuilder provides a test script that creates all images and initrds for all
|
||||
supported distributions and then tests them to ensure a Kata Container can
|
||||
be created with each.
|
||||
|
||||
The test script installs all required Kata components on the host system
|
||||
before creating the images.
|
||||
|
||||
To run all available osbuilder tests:
|
||||
Before the build phase, the test script installs the Docker container manager
|
||||
and all the Kata components required to run test containers. This step can be
|
||||
skipped by setting the environment variable `KATA_DEV_MODE` to a non-empty
|
||||
value.
|
||||
|
||||
```
|
||||
$ ./test_images.sh
|
||||
|
@ -235,7 +235,17 @@ setup()
|
||||
|
||||
[ ! -d "${tests_repo_dir}" ] && git clone "https://${tests_repo}" "${tests_repo_dir}"
|
||||
|
||||
chronic $mgr install-docker-system
|
||||
if [ -z "${KATA_DEV_MODE:-}" ]; then
|
||||
chronic $mgr install-docker-system
|
||||
else
|
||||
info "Running with KATA_DEV_MODE set, skipping installation of docker and kata packages"
|
||||
# Make sure docker & kata are available
|
||||
command -v docker >/dev/null || die "docker cannot be found on your PATH"
|
||||
local cfgRuntime=
|
||||
cfgRuntime="$(docker info --format "{{(index .Runtimes \"${RUNTIME}\").Path}}")"
|
||||
[ -n "$cfgRuntime" ] || die "${RUNTIME} is not a configured runtime for docker"
|
||||
[ -x "$cfgRuntime" ] || die "docker ${RUNTIME} is linked to an invalid executable: $cfgRuntime"
|
||||
fi
|
||||
chronic $mgr enable-debug
|
||||
|
||||
# Ensure "docker build" works
|
||||
|
Loading…
Reference in New Issue
Block a user