tests: Pass DOCKER_RUNTIME to osbuilder scripts

The rootfs and image builder scripts are wired up to handle the
DOCKER_RUNTIME, so pass our value down to those scripts

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2020-03-01 17:12:36 -05:00
parent e8624d89d9
commit 0e6a12ce3c

View File

@ -494,6 +494,7 @@ test_distros()
get_distros_config "$distro" get_distros_config "$distro"
local commonMakeVars=( \ local commonMakeVars=( \
USE_DOCKER=true \ USE_DOCKER=true \
DOCKER_RUNTIME="${DOCKER_RUNTIME}" \
ROOTFS_BUILD_DEST="$tmp_rootfs" \ ROOTFS_BUILD_DEST="$tmp_rootfs" \
IMAGES_BUILD_DEST="$images_dir" \ IMAGES_BUILD_DEST="$images_dir" \
DEBUG=1 ) DEBUG=1 )
@ -642,11 +643,19 @@ test_dracut()
-v /etc/localtime:/etc/localtime:ro \ -v /etc/localtime:/etc/localtime:ro \
dracut-test-osbuilder \ dracut-test-osbuilder \
) )
typeset -a makeVars=(BUILD_METHOD=dracut TARGET_INITRD="${initrd_path}" TARGET_IMAGE=${image_path} TARGET_ROOTFS=${rootfs_path})
typeset -a makeVars=(\
BUILD_METHOD=dracut \
TARGET_INITRD="${initrd_path}" \
TARGET_IMAGE=${image_path} \
TARGET_ROOTFS=${rootfs_path} \
USE_DOCKER=1 \
DOCKER_RUNTIME="${DOCKER_RUNTIME}" \
)
info "Making image for dracut inside a container" info "Making image for dracut inside a container"
silent_run docker run ${dockerRunArgs[@]} make -C ${tmp_dir} ${makeVars[@]} rootfs silent_run docker run ${dockerRunArgs[@]} make -C ${tmp_dir} ${makeVars[@]} rootfs
make_image USE_DOCKER=1 ${makeVars[@]} make_image ${makeVars[@]}
local image_size=$(stat -c "%s" "${image_path}") local image_size=$(stat -c "%s" "${image_path}")
local rootfs_size=$(get_rootfs_size "$rootfs_path") local rootfs_size=$(get_rootfs_size "$rootfs_path")
built_images["dracut"]="${rootfs_size}:${image_size}" built_images["dracut"]="${rootfs_size}:${image_size}"