summaryrefslogtreecommitdiffstats
path: root/tests/Makefile.include
diff options
context:
space:
mode:
authorAlex Bennée2018-06-08 13:12:46 +0200
committerAlex Bennée2018-06-20 23:13:32 +0200
commit1a7fab926b3d9913149f3a859185cee7f27f767a (patch)
tree56598c59bfbc313d0bc13e2f307250202c45c117 /tests/Makefile.include
parenttests/tcg/i386: extend timeout for runcom test (diff)
downloadqemu-1a7fab926b3d9913149f3a859185cee7f27f767a.tar.gz
qemu-1a7fab926b3d9913149f3a859185cee7f27f767a.tar.xz
qemu-1a7fab926b3d9913149f3a859185cee7f27f767a.zip
tests: add top-level make dependency for docker builds
One problem with satisfying your docker dependencies in a sub-make it you might end up trying to satisfy the dependency multiple times. This is especially a problem with debian-sid based cross compilers and CI setups. We solve this by doing a docker build pass at the top level before any sub-makes are called. We still need to satisfy dependencies in the Makefile.target call so people can run tests from individual target directories. We introduce a new Makefile.probe which gets called for each PROBE_TARGET and allows us to build up the list. It does require multiply including config-target.mak which shouldn't cause any issues as it shouldn't define anything that clashes with config-host.mak. However we undefine a few key variables each time around. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'tests/Makefile.include')
-rw-r--r--tests/Makefile.include8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 5c401874e8..da647324a2 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -938,6 +938,14 @@ BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(LINUX_USER_TARGETS))
CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(LINUX_USER_TARGETS))
RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(LINUX_USER_TARGETS))
+ifeq ($(HAVE_USER_DOCKER),y)
+# Probe for the Docker Builds needed for each build
+$(foreach PROBE_TARGET,$(TARGET_LIST), \
+ $(eval -include $(SRC_PATH)/tests/tcg/Makefile.probe) \
+ $(if $(DOCKER_PREREQ), \
+ $(eval build-tcg-tests-$(PROBE_TARGET): $(DOCKER_PREREQ))))
+endif
+
build-tcg-tests-%:
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" guest-tests,)