diff mbox series

[RFC,09/10] tests: tcg skip docker images we can't build

Message ID 20180718100505.7546-10-alex.bennee@linaro.org
State New
Headers show
Series docker on non-x86 hosts | expand

Commit Message

Alex Bennée July 18, 2018, 10:05 a.m. UTC
We have a mechansim (DOCKER_PARTIAL_IMAGES) for marking stuff that is
incomplete or won't build. We can use this to avoid attempting to
build them at the top of a check-tcg build. We need to move the
inclusion of docker/Makefile.include to ensure everything is resolved
by this point.

We also have to check this in tests/tcg/Makefile.include to cover the
case where users are building directly out of the target tree.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 Makefile                   | 4 +++-
 tests/tcg/Makefile.include | 3 +++
 tests/tcg/Makefile.probe   | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

-- 
2.17.1
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 2da686be33..6bb8035557 100644
--- a/Makefile
+++ b/Makefile
@@ -434,6 +434,9 @@  dummy := $(call unnest-vars,, \
                 audio-obj-m \
                 trace-obj-y)
 
+# we need to know what Docker images can be built before we can
+# decide on all the tests that can be built.
+include $(SRC_PATH)/tests/docker/Makefile.include
 include $(SRC_PATH)/tests/Makefile.include
 
 all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all modules
@@ -1069,7 +1072,6 @@  endif
 # Dependencies in Makefile.objs files come from our recursive subdir rules
 -include $(wildcard *.d tests/*.d)
 
-include $(SRC_PATH)/tests/docker/Makefile.include
 include $(SRC_PATH)/tests/vm/Makefile.include
 
 .PHONY: help
diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include
index 57470b2a2c..e5f0298375 100644
--- a/tests/tcg/Makefile.include
+++ b/tests/tcg/Makefile.include
@@ -41,6 +41,8 @@  ifneq ($(DOCKER_IMAGE),)
 # We also need the Docker make rules to depend on
 include $(SRC_PATH)/tests/docker/Makefile.include
 
+ifneq ($(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGE)),)
+
 DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \
 		--cc $(DOCKER_CROSS_COMPILER) \
 		-i qemu:$(DOCKER_IMAGE) \
@@ -58,6 +60,7 @@  docker-build-guest-tests: $(DOCKER_PREREQ)
 
 GUEST_BUILD=docker-build-guest-tests
 
+endif
 endif
 endif
 
diff --git a/tests/tcg/Makefile.probe b/tests/tcg/Makefile.probe
index 15c0412657..22c77d6b88 100644
--- a/tests/tcg/Makefile.probe
+++ b/tests/tcg/Makefile.probe
@@ -20,7 +20,7 @@  DOCKER_PREREQ:=
 -include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include
 
 ifndef CROSS_CC_GUEST
-ifneq ($(DOCKER_IMAGE),)
+ifneq ($(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGE)),)
 DOCKER_PREREQ:=docker-image-$(DOCKER_IMAGE)
 endif
 endif