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>
This commit is contained in:
parent
78ebc00b06
commit
c691925092
1
configure
vendored
1
configure
vendored
@ -1694,7 +1694,6 @@ if test -n "$gdb_bin"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$container" != no; then
|
if test "$container" != no; then
|
||||||
echo "ENGINE=$container" >> $config_host_mak
|
|
||||||
echo "RUNC=$runc" >> $config_host_mak
|
echo "RUNC=$runc" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
echo "SUBDIRS=$subdirs" >> $config_host_mak
|
echo "SUBDIRS=$subdirs" >> $config_host_mak
|
||||||
|
@ -16,9 +16,8 @@ DOCKER_DEFAULT_REGISTRY := registry.gitlab.com/qemu-project/qemu
|
|||||||
endif
|
endif
|
||||||
DOCKER_REGISTRY := $(if $(REGISTRY),$(REGISTRY),$(DOCKER_DEFAULT_REGISTRY))
|
DOCKER_REGISTRY := $(if $(REGISTRY),$(REGISTRY),$(DOCKER_DEFAULT_REGISTRY))
|
||||||
|
|
||||||
RUNC ?= docker
|
RUNC ?= $(if $(shell command -v docker), docker, podman)
|
||||||
ENGINE ?= auto
|
DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(RUNC)
|
||||||
DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(ENGINE)
|
|
||||||
|
|
||||||
CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
|
CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
|
||||||
DOCKER_SRC_COPY := $(BUILD_DIR)/docker-src.$(CUR_TIME)
|
DOCKER_SRC_COPY := $(BUILD_DIR)/docker-src.$(CUR_TIME)
|
||||||
@ -158,7 +157,7 @@ $(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES)), \
|
|||||||
)
|
)
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
@echo 'Build QEMU and run tests inside Docker or Podman containers'
|
@echo 'Build QEMU and run tests inside $(RUNC) containers'
|
||||||
@echo
|
@echo
|
||||||
@echo 'Available targets:'
|
@echo 'Available targets:'
|
||||||
@echo
|
@echo
|
||||||
@ -198,8 +197,6 @@ docker:
|
|||||||
@echo ' EXECUTABLE=<path> Include executable in image.'
|
@echo ' EXECUTABLE=<path> Include executable in image.'
|
||||||
@echo ' EXTRA_FILES="<path> [... <path>]"'
|
@echo ' EXTRA_FILES="<path> [... <path>]"'
|
||||||
@echo ' Include extra files in image.'
|
@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))'
|
@echo ' REGISTRY=url Cache builds from registry (default:$(DOCKER_REGISTRY))'
|
||||||
|
|
||||||
docker-help: docker
|
docker-help: docker
|
||||||
|
Loading…
x
Reference in New Issue
Block a user