Skip to contentSkip to conversation

tests/Makefile: Don't run any qtests twice

PATCH New Peter Maydell 1 participant 1 message Mar 31, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/Makefile: Don't run any qtests twice

Commit 3687d5325 accidentally resulted in our running qom-test twice for x86_64, once directly via the wildcard, and once because x86_64 includes all the i386 qtests (which includes qom-test). Run the list of qtests through $(sort) to remove duplicates so we only ever run a qtest once.

---
 tests/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)
tests/Makefile +6 -0
index 2d021fb..21d4197 100644
@@ -277,6 +277,12 @@ tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_hel
 # QTest rules
 
 TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS)))
+
+# Now sort to remove possible duplicates resulting from including
+# all of one target's tests in another's (eg i386, x86_64)
+$(foreach TARGET,$(TARGETS), \
+    $(eval check-qtest-$(TARGET)-y := $(sort $(check-qtest-$(TARGET)-y))))
+
 QTEST_TARGETS=$(foreach TARGET,$(TARGETS), $(if $(check-qtest-$(TARGET)-y), $(TARGET),))
 check-qtest-$(CONFIG_POSIX)=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y))
 
Signature · 1 line
1.9.0