summaryrefslogtreecommitdiffstats
path: root/tests/docker/Makefile.include
diff options
context:
space:
mode:
Diffstat (limited to 'tests/docker/Makefile.include')
-rw-r--r--tests/docker/Makefile.include29
1 files changed, 17 insertions, 12 deletions
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index f1a0c5db7a..e495b163a0 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -8,13 +8,19 @@ COMMA := ,
HOST_ARCH = $(if $(ARCH),$(ARCH),$(shell uname -m))
+# These variables can be set by the user to limit the set of docker
+# images and tests to a more restricted subset
+TESTS ?= %
+IMAGES ?= %
+
DOCKER_SUFFIX := .docker
DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles
# we don't run tests on intermediate images (used as base by another image)
DOCKER_PARTIAL_IMAGES := debian10 debian11
# we don't directly build virtual images (they are used to build other images)
DOCKER_VIRTUAL_IMAGES := debian-bootstrap debian-toolchain empty
-DOCKER_IMAGES := $(sort $(filter-out $(DOCKER_VIRTUAL_IMAGES), $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))))
+__IMAGES := $(sort $(filter-out $(DOCKER_VIRTUAL_IMAGES), $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))))
+DOCKER_IMAGES := $(if $(IMAGES), $(filter $(IMAGES), $(__IMAGES)), $(__IMAGES))
DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES))
# Use a global constant ccache directory to speed up repetitive builds
DOCKER_CCACHE_DIR := $$HOME/.cache/qemu-docker-ccache
@@ -23,16 +29,14 @@ DOCKER_DEFAULT_REGISTRY := registry.gitlab.com/qemu-project/qemu
endif
DOCKER_REGISTRY := $(if $(REGISTRY),$(REGISTRY),$(DOCKER_DEFAULT_REGISTRY))
-DOCKER_TESTS := $(notdir $(shell \
- find $(SRC_PATH)/tests/docker/ -name 'test-*' -type f))
+__TESTS := $(notdir $(shell \
+ find $(SRC_PATH)/tests/docker/ -name 'test-*' -type f))
+DOCKER_TESTS := $(if $(TESTS), $(filter $(TESTS), $(__TESTS)), $(__TESTS))
ENGINE := auto
DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(ENGINE)
-TESTS ?= %
-IMAGES ?= %
-
CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
DOCKER_SRC_COPY := $(BUILD_DIR)/docker-src.$(CUR_TIME)
@@ -133,7 +137,6 @@ DOCKER_PARTIAL_IMAGES += fedora
endif
docker-image-debian-alpha-cross: docker-image-debian10
-docker-image-debian-arm64-cross: docker-image-debian10
docker-image-debian-armel-cross: docker-image-debian10
docker-image-debian-armhf-cross: docker-image-debian10
docker-image-debian-hppa-cross: docker-image-debian10
@@ -143,7 +146,6 @@ docker-image-debian-mips64-cross: docker-image-debian10
docker-image-debian-mips64el-cross: docker-image-debian10
docker-image-debian-mipsel-cross: docker-image-debian10
docker-image-debian-ppc64el-cross: docker-image-debian10
-docker-image-debian-s390x-cross: docker-image-debian10
docker-image-debian-sh4-cross: docker-image-debian10
docker-image-debian-sparc64-cross: docker-image-debian10
@@ -154,6 +156,9 @@ docker-image-debian-native: DOCKER_REGISTRY=
docker-image-debian10: NOUSER=1
docker-image-debian11: NOUSER=1
+# alpine has no adduser
+docker-image-alpine: NOUSER=1
+
#
# The build rule for hexagon-cross is special in so far for most of
# the time we don't want to build it. While dockers caching does avoid
@@ -206,19 +211,19 @@ docker-image-debian-nios2-cross: $(DOCKER_FILES_DIR)/debian-toolchain.docker \
# Specialist build images, sometimes very limited tools
docker-image-debian-tricore-cross: docker-image-debian10
docker-image-debian-all-test-cross: docker-image-debian10
-docker-image-debian-arm64-test-cross: docker-image-debian11
docker-image-debian-microblaze-cross: docker-image-debian10
docker-image-debian-nios2-cross: docker-image-debian10
docker-image-debian-powerpc-test-cross: docker-image-debian11
+docker-image-debian-riscv64-test-cross: docker-image-debian11
# These images may be good enough for building tests but not for test builds
DOCKER_PARTIAL_IMAGES += debian-alpha-cross
-DOCKER_PARTIAL_IMAGES += debian-arm64-test-cross
DOCKER_PARTIAL_IMAGES += debian-powerpc-test-cross
DOCKER_PARTIAL_IMAGES += debian-hppa-cross
DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross
DOCKER_PARTIAL_IMAGES += debian-microblaze-cross
DOCKER_PARTIAL_IMAGES += debian-nios2-cross
+DOCKER_PARTIAL_IMAGES += debian-riscv64-test-cross
DOCKER_PARTIAL_IMAGES += debian-sh4-cross debian-sparc64-cross
DOCKER_PARTIAL_IMAGES += debian-tricore-cross
DOCKER_PARTIAL_IMAGES += debian-xtensa-cross
@@ -274,8 +279,8 @@ endif
@echo ' TARGET_LIST=a,b,c Override target list in builds.'
@echo ' EXTRA_CONFIGURE_OPTS="..."'
@echo ' Extra configure options.'
- @echo ' IMAGES="a b c ..": Filters which images to build or run.'
- @echo ' TESTS="x y z .." Filters which tests to run (for docker-test).'
+ @echo ' IMAGES="a b c ..": Restrict available images to subset.'
+ @echo ' TESTS="x y z .." Restrict available tests to subset.'
@echo ' J=[0..9]* Overrides the -jN parameter for make commands'
@echo ' (default is 1)'
@echo ' DEBUG=1 Stop and drop to shell in the created container'