Commit e77a38d894 for qemu.org
commit e77a38d8944cafd7285b9f7caa4771e89027dd1c
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: Sat Oct 17 09:39:52 2026 +0200
tcg/tests: add an alias for all TCG tests of a target
Allow building (without running) all the TCG tests that are available
for a target, so that they can be run manually.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20261017073952.1346449-1-pbonzini@redhat.com
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
diff --git a/docs/devel/testing/main.rst b/docs/devel/testing/main.rst
index fadb376eaf..b0ca37fe2b 100644
--- a/docs/devel/testing/main.rst
+++ b/docs/devel/testing/main.rst
@@ -1035,12 +1035,14 @@ See :ref:`container-ref` for more details.
Running subset of tests
~~~~~~~~~~~~~~~~~~~~~~~
-You can build the tcg tests using::
+You can build and run the TCG tests using respectively::
make tcg-tests
+ make check-tcg-$TARGET
-And run them for one target with::
+Or for a single target::
+ make tcg-tests-$TARGET
make check-tcg-$TARGET
Adding ``V=1`` to the invocation will show the details of how to
diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build
index a0719600af..1cd2d421ce 100644
--- a/tests/tcg/meson.build
+++ b/tests/tcg/meson.build
@@ -198,6 +198,7 @@ image_targets = {}
exe_targets = []
# Finally, we can create all test executables and test targets
foreach target, plan: tcg_tests
+ target_exe_targets = []
if target.startswith('multiarch-')
# those tests are included by architecture files if needed
continue
@@ -452,7 +453,7 @@ foreach target, plan: tcg_tests
depends: exe_depends,
depend_files: build_test_depend_files,
build_by_default: false)
- exe_targets += exe
+ target_exe_targets += exe
built_tests += {exe_name: exe}
endif
@@ -539,6 +540,11 @@ foreach target, plan: tcg_tests
added_tests += {test_name: true}
endforeach
endforeach
+ if target_exe_targets.length() > 0
+ # finally create a top level target to rebuild all tests for this target
+ alias_target('tcg-tests-' + target, target_exe_targets)
+ endif
+ exe_targets += target_exe_targets
endforeach
if exe_targets.length() > 0