[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 43/49] tests/Makefile.include: add [build|clean|c
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PATCH v6 43/49] tests/Makefile.include: add [build|clean|check]-tcg targets |
Date: |
Fri, 8 Jun 2018 13:33:01 +0100 |
This will ensure all linux-user targets build their guest test
programs and ensure check-tcg will run the respective tests.
Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
---
v2
- use -include instead of complex macro stuff
- also include TARGET_BASE_ARCH/Makefile
v3
- add build-tcg, make check-tcg actually run tests
---
tests/Makefile.include | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 0eaa835b8a..ca00247e36 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -10,6 +10,7 @@ check-help:
@echo " $(MAKE) check-speed Run qobject speed tests"
@echo " $(MAKE) check-qapi-schema Run QAPI schema tests"
@echo " $(MAKE) check-block Run block tests"
+ @echo " $(MAKE) check-tcg Run TCG tests"
@echo " $(MAKE) check-report.html Generates an HTML test report"
@echo " $(MAKE) check-clean Clean the tests"
@echo
@@ -923,6 +924,30 @@ check-report.xml: $(patsubst %,check-report-qtest-%.xml,
$(QTEST_TARGETS)) check
check-report.html: check-report.xml
$(call quiet-command,gtester-report $< > $@,"GEN","$@")
+# Per guest TCG tests
+
+LINUX_USER_TARGETS=$(filter %-linux-user,$(TARGET_LIST))
+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))
+
+build-tcg-tests-%:
+ $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)"
TARGET_DIR="$*/" guest-tests,)
+
+run-tcg-tests-%: build-tcg-tests-%
+ $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)"
TARGET_DIR="$*/" run-guest-tests,)
+
+clean-tcg-tests-%:
+ $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)"
TARGET_DIR="$*/" clean-guest-tests,)
+
+.PHONY: build-tcg
+build-tcg: $(BUILD_TCG_TARGET_RULES)
+
+.PHONY: check-tcg
+check-tcg: $(RUN_TCG_TARGET_RULES)
+
+.PHONY: clean-tcg
+clean-tcg: $(CLEAN_TCG_TARGET_RULES)
# Other tests
@@ -965,7 +990,6 @@ check-speed: $(patsubst %,check-%, $(check-speed-y))
check-block: $(patsubst %,check-%, $(check-block-y))
check: check-qapi-schema check-unit check-qtest check-decodetree
check-clean:
- $(MAKE) -C tests/tcg clean
rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST),
$(check-qtest-$(target)-y)) $(check-qtest-generic-y))
rm -f tests/test-qapi-gen-timestamp
--
2.17.1
- [Qemu-devel] [PATCH v6 16/49] tests/tcg/i386: fix test-i386, (continued)
- [Qemu-devel] [PATCH v6 16/49] tests/tcg/i386: fix test-i386, Alex Bennée, 2018/06/08
- [Qemu-devel] [PATCH v6 21/49] tests/tcg: move ARM specific tests into subdir, Alex Bennée, 2018/06/08
- [Qemu-devel] [PATCH v6 49/49] .travis.yml: add check-tcg test, Alex Bennée, 2018/06/08
- [Qemu-devel] [PATCH v6 47/49] tests: add top-level make dependency for docker builds, Alex Bennée, 2018/06/08
- [Qemu-devel] [PATCH v6 43/49] tests/Makefile.include: add [build|clean|check]-tcg targets,
Alex Bennée <=
- [Qemu-devel] [PATCH v6 18/49] tests/tcg/x86_64: add Makefile.target, Alex Bennée, 2018/06/08
- [Qemu-devel] [PATCH v6 31/49] tests/tcg: enable building for Alpha, Alex Bennée, 2018/06/08
- [Qemu-devel] [PATCH v6 25/49] tests/tcg/arm: add fcvt test cases for AArch32/64, Alex Bennée, 2018/06/08
- [Qemu-devel] [PATCH v6 42/49] Makefile.target: add (clean-/build-)guest-tests targets, Alex Bennée, 2018/06/08
- Re: [Qemu-devel] [PATCH v6 00/49] fix building of tests/tcg, no-reply, 2018/06/08
- Re: [Qemu-devel] [PATCH v6 00/49] fix building of tests/tcg, Philippe Mathieu-Daudé, 2018/06/10
- Re: [Qemu-devel] [PATCH v6 00/49] fix building of tests/tcg, Philippe Mathieu-Daudé, 2018/06/10