aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-01-28 14:48:54 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-08-21 06:30:07 -0400
commit245dac4a1bef719d648e20c84bbf3dcaf50de988 (patch)
tree1edcc6c1c051e496bf88eb3ecb05ba2b406ac908 /Makefile
parent968b4db38a717d334db9298fb7b6f6ba71d08806 (diff)
downloadqemu-245dac4a1bef719d648e20c84bbf3dcaf50de988.zip
qemu-245dac4a1bef719d648e20c84bbf3dcaf50de988.tar.gz
qemu-245dac4a1bef719d648e20c84bbf3dcaf50de988.tar.bz2
meson: add testsuite Makefile generator
Rules to execute tests are generated by a simple Python program that integrates into the existing "make check" mechanism. This provides familiarity for developers, and also allows piecewise conversion of the testsuite Makefiles to meson. The generated rules are based on QEMU's existing test harness Makefile and TAP parser. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 81c9642..5f9aae6 100644
--- a/Makefile
+++ b/Makefile
@@ -68,6 +68,14 @@ Makefile.ninja: build.ninja ninjatool
${ninja-targets-c_COMPILER} ${ninja-targets-cpp_COMPILER}: .var.command += -MP
+# If MESON is empty, the rule will be re-evaluated after Makefiles are
+# reread (and MESON won't be empty anymore).
+ifneq ($(MESON),)
+Makefile.mtest: build.ninja scripts/mtest2make.py
+ $(MESON) introspect --tests | $(PYTHON) scripts/mtest2make.py > $@
+-include Makefile.mtest
+endif
+
.git-submodule-status: git-submodule-update config-host.mak
# Check that we're not trying to do an out-of-tree build from
@@ -825,7 +833,7 @@ distclean: clean ninja-distclean
rm -f roms/seabios/config.mak roms/vgabios/config.mak
rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols
rm -rf meson-private meson-logs meson-info compile_commands.json
- rm -f Makefile.ninja ninjatool ninjatool.stamp
+ rm -f Makefile.ninja ninjatool ninjatool.stamp Makefile.mtest
rm -f config.log
rm -f linux-headers/asm
rm -f docs/version.texi