[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/25] tests/docker: make docker engine choice entirely configure
|
From: |
Alex Bennée |
|
Subject: |
[PULL 05/25] tests/docker: make docker engine choice entirely configure driven |
|
Date: |
Wed, 11 Oct 2023 11:33:09 +0100 |
Since 0b1a649047 (tests/docker: use direct RUNC call to build
containers) we ended up with the potential for the remaining docker.py
script calls to deviate from the direct RUNC calls. Fix this by
dropping the use of ENGINE in the makefile and rely entirely on what
we detect at configure time.
We also tweak the RUNC detection so podman users can still run things
from the source tree.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20231009164104.369749-6-alex.bennee@linaro.org>
diff --git a/configure b/configure
index 97a5e8de49..1f26639e4f 100755
--- a/configure
+++ b/configure
@@ -1694,7 +1694,6 @@ if test -n "$gdb_bin"; then
fi
if test "$container" != no; then
- echo "ENGINE=$container" >> $config_host_mak
echo "RUNC=$runc" >> $config_host_mak
fi
echo "SUBDIRS=$subdirs" >> $config_host_mak
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index dfabafab92..ab68b2dbad 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -16,9 +16,8 @@ DOCKER_DEFAULT_REGISTRY :=
registry.gitlab.com/qemu-project/qemu
endif
DOCKER_REGISTRY := $(if $(REGISTRY),$(REGISTRY),$(DOCKER_DEFAULT_REGISTRY))
-RUNC ?= docker
-ENGINE ?= auto
-DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(ENGINE)
+RUNC ?= $(if $(shell command -v docker), docker, podman)
+DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(RUNC)
CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
DOCKER_SRC_COPY := $(BUILD_DIR)/docker-src.$(CUR_TIME)
@@ -158,7 +157,7 @@ $(foreach i,$(filter-out
$(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES)), \
)
docker:
- @echo 'Build QEMU and run tests inside Docker or Podman containers'
+ @echo 'Build QEMU and run tests inside $(RUNC) containers'
@echo
@echo 'Available targets:'
@echo
@@ -198,8 +197,6 @@ docker:
@echo ' EXECUTABLE=<path> Include executable in image.'
@echo ' EXTRA_FILES="<path> [... <path>]"'
@echo ' Include extra files in image.'
- @echo ' ENGINE=auto/docker/podman'
- @echo ' Specify which container engine to run.'
@echo ' REGISTRY=url Cache builds from registry
(default:$(DOCKER_REGISTRY))'
docker-help: docker
--
2.39.2
- [PULL 00/25] testing, gdbstub and plugin updates, Alex Bennée, 2023/10/11
- [PULL 02/25] tests/avocado: remove flaky test marking for test_sbsaref_edk2_firmware, Alex Bennée, 2023/10/11
- [PULL 10/25] plugins: Check if vCPU is realized, Alex Bennée, 2023/10/11
- [PULL 04/25] gitlab: shuffle some targets and reduce avocado noise, Alex Bennée, 2023/10/11
- [PULL 14/25] hw/core/cpu: Return static value with gdb_arch_name(), Alex Bennée, 2023/10/11
- [PULL 13/25] target/arm: Move the reference to arm-core.xml, Alex Bennée, 2023/10/11
- [PULL 19/25] gdbstub: Replace gdb_regs with an array, Alex Bennée, 2023/10/11
- [PULL 01/25] tests/avocado: update firmware to enable OpenBSD test on sbsa-ref, Alex Bennée, 2023/10/11
- [PULL 08/25] gdbstub: Fix target_xml initialization, Alex Bennée, 2023/10/11
- [PULL 05/25] tests/docker: make docker engine choice entirely configure driven,
Alex Bennée <=
- [PULL 09/25] gdbstub: Fix target.xml response, Alex Bennée, 2023/10/11
- [PULL 06/25] configure: allow user to override docker engine, Alex Bennée, 2023/10/11
- [PULL 20/25] accel/tcg: Add plugin_enabled to DisasContextBase, Alex Bennée, 2023/10/11
- [PULL 15/25] gdbstub: Use g_markup_printf_escaped(), Alex Bennée, 2023/10/11
- [PULL 03/25] tests/lcitool: add swtpm to the package list, Alex Bennée, 2023/10/11
- [PULL 07/25] configure: remove gcc version suffixes, Alex Bennée, 2023/10/11
- [PULL 11/25] contrib/plugins: Use GRWLock in execlog, Alex Bennée, 2023/10/11
- [PULL 12/25] gdbstub: Introduce GDBFeature structure, Alex Bennée, 2023/10/11
- [PULL 17/25] target/ppc: Remove references to gdb_has_xml, Alex Bennée, 2023/10/11
- [PULL 23/25] contrib/plugins: fix coverity warning in cache, Alex Bennée, 2023/10/11