Commit 76c22418be for qemu.org

commit 76c22418be6496875c85fd64d75862dd70856608
Author: Alex Bennée <alex.bennee@linaro.org>
Date:   Thu Sep 17 17:55:52 2026 +0100

    tests/tcg: don't define tests when missing compilers

    Skip defining the tests if we don't have a compiler to build them.
    Otherwise we add a bunch of noise to the reported results. We still do
    report when we skip because the compiler doesn't have the features we
    need to build.

    Suggested-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
    Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
    Message-ID: <20260917165602.3405537-9-alex.bennee@linaro.org>
    Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build
index 814f2f8cd8..5819fdf0bf 100644
--- a/tests/tcg/meson.build
+++ b/tests/tcg/meson.build
@@ -499,10 +499,14 @@ foreach target, plan: tcg_tests
         cmd = ['sh', '-c', 'echo "' + skip_test + '" && exit 77']
       endif

-      test(test_name, env, args: cmd,
-           depends: test_depends,
-           timeout: 120,
-           suite: ['tcg', 'tcg-' + target])
+      # Do not add a skipped test when compiler is missing,
+      # though we still check all tests are correctly defined.
+      if has_cc
+        test(test_name, env, args: cmd,
+             depends: test_depends,
+             timeout: 120,
+             suite: ['tcg', 'tcg-' + target])
+      endif
       added_tests += {test_name: true}
     endforeach
   endforeach