aboutsummaryrefslogtreecommitdiff
path: root/tests/docker
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2023-10-09 17:40:44 +0100
committerAlex Bennée <alex.bennee@linaro.org>2023-10-11 08:46:33 +0100
commitc6919250921c4794f4029bfe3f9f1c5263328899 (patch)
treeccf61afc7165078b4a1db38bb0d297fcc92f4a85 /tests/docker
parent78ebc00b068131d2e3c0f8e66c0ded3fadb248d0 (diff)
downloadqemu-c6919250921c4794f4029bfe3f9f1c5263328899.zip
qemu-c6919250921c4794f4029bfe3f9f1c5263328899.tar.gz
qemu-c6919250921c4794f4029bfe3f9f1c5263328899.tar.bz2
tests/docker: make docker engine choice entirely configure driven
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>
Diffstat (limited to 'tests/docker')
-rw-r--r--tests/docker/Makefile.include9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index dfabafa..ab68b2d 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