tests: Fix "make check-functional" for targets without thorough tests
PATCH 1/1 tests: Fix "make check-functional" for targets without thorough tests
From: Thomas Huth <[email protected]>
If QEMU gets configured for a single target that does not have any thorough functional tests, "make check-functional" currently fails with the error message "No rule to make target 'check-func'". This happens because "check-func" only gets defined for thorough tests (quick ones get added to "check-func-quick" instead). Thus let's define a dummy target for this case, that simply depends on the quick tests.
--- tests/Makefile.include | 2 ++ 1 file changed, 2 insertions(+)
tests/Makefile.include +2 -0
@@ -113,6 +113,8 @@ check-functional: @$(NINJA) precache-functional @QEMU_TEST_NO_DOWNLOAD=1 $(MAKE) SPEED=thorough check-func check-func-quick +check-func: check-func-quick + # Consolidated targets .PHONY: check check-clean
Signature · 1 line
2.51.0
Quoted 10 lines · Thomas Huth
From: Thomas Huth <[email protected]>
If QEMU gets configured for a single target that does not have any thorough functional tests, "make check-functional" currently fails with the error message "No rule to make target 'check-func'". This happens because "check-func" only gets defined for thorough tests (quick ones get added to "check-func-quick" instead). Thus let's define a dummy target for this case, that simply depends on the quick tests.
We also have the opposite problem if there are no 'quick' tests, which you can see if you try 'check-functional' on a build configured with the aarch64-linux-user target only:
$ make -C build/aarch64-linux/ check-functional make: Entering directory '/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/aarch64-linux' /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/aarch64-linux/pyvenv/bin/meson introspect --targets --tests --benchmarks | /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/aarch64-linux/pyvenv/bin/python3 -B scripts/mtest2make.py > Makefile.mtest [0/1] Running external command precache-functional (wrapped by meson to set env) make[1]: Entering directory '/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/aarch64-linux' make[1]: *** No rule to make target 'check-func-quick', needed by 'check-func'. Stop. make[1]: Leaving directory '/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/aarch64-linux' make: *** [/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/tests/Makefile.include:114: check-functional] Error 2 make: Leaving directory '/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/aarch64-linux'
(Those errors are with this patch applied; without it the error is slightly different:
make[1]: *** No rule to make target 'check-func'. Stop.)
But that can't show up on a system-emulation target, because tests like generic/version are in the "quick" category.
thanks
-- PMM
Quoted 12 lines · Peter Maydell
Quoted 10 lines · Thomas Huth
From: Thomas Huth <[email protected]>
If QEMU gets configured for a single target that does not have any thorough functional tests, "make check-functional" currently fails with the error message "No rule to make target 'check-func'". This happens because "check-func" only gets defined for thorough tests (quick ones get added to "check-func-quick" instead). Thus let's define a dummy target for this case, that simply depends on the quick tests.
Quoted 5 lines
Tested-by Peter Maydell <[email protected]>We also have the opposite problem if there are no 'quick' tests, which you can see if you try 'check-functional' on a build configured with the aarch64-linux-user target only:
Yes, looks like we have to define both targets in Makefile.include, just in case of such situations. I just sent a v2 to fix it.
Thomas