]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
configure: store container engine in config-host.mak
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 29 Sep 2022 11:41:58 +0000 (12:41 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Thu, 6 Oct 2022 10:53:40 +0000 (11:53 +0100)
In preparation for removing $(DOCKER_SCRIPT) from the tests/tcg configuration
files, have Make use the same container engine that had been probed at
configure time.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220929114231.583801-19-alex.bennee@linaro.org>

configure
tests/docker/Makefile.include

index a62a833d835f05c412452e3efe00df433c3c67c6..15033a4935af9bba222e0e7fafec419e9089e487 100755 (executable)
--- a/configure
+++ b/configure
@@ -1779,9 +1779,11 @@ fi
 
 container="no"
 if test $use_containers = "yes"; then
-    if has "docker" || has "podman"; then
-        container=$($python "$source_path"/tests/docker/docker.py probe)
-    fi
+    case $($python "$source_path"/tests/docker/docker.py probe) in
+        *docker) container=docker ;;
+        podman) container=podman ;;
+        no) container=no ;;
+    esac
 fi
 
 # cross compilers defaults, can be overridden with --cross-cc-ARCH
@@ -2373,6 +2375,9 @@ if test -n "$gdb_bin"; then
     fi
 fi
 
+if test "$container" != no; then
+    echo "ENGINE=$container" >> $config_host_mak
+fi
 echo "ROMS=$roms" >> $config_host_mak
 echo "MAKE=$make" >> $config_host_mak
 echo "PYTHON=$python" >> $config_host_mak
index 270e99786ea4b559883e60a59cae234124167195..c87f14477a1fd488e3552593395e533b766dcef2 100644 (file)
@@ -14,7 +14,7 @@ DOCKER_DEFAULT_REGISTRY := registry.gitlab.com/qemu-project/qemu
 endif
 DOCKER_REGISTRY := $(if $(REGISTRY),$(REGISTRY),$(DOCKER_DEFAULT_REGISTRY))
 
-ENGINE := auto
+ENGINE ?= auto
 DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(ENGINE)
 
 CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)