qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Alexandre Iooss" <erdnaxe@crans.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Mahmoud Mandour" <ma.mandourr@gmail.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>
Subject: [PATCH v2 03/11] tests/tcg: honour the available QEMU binaries when running check-tcg
Date: Thu,  4 Dec 2025 19:48:54 +0000	[thread overview]
Message-ID: <20251204194902.1340008-4-alex.bennee@linaro.org> (raw)
In-Reply-To: <20251204194902.1340008-1-alex.bennee@linaro.org>

Currently configure can identify all the targets that have
cross-compilers available from the supplied target-list. By default
this is the default_target_list which is all possible targets we can
build.

At the same time the target list passed to meson is filtered down
depending on various factors including not building 64 bit targets on
32 bit hosts. As a result make check-tcg will erroneously attempt to
run tests for which we haven't built a QEMU.

Solve this by filtering the final list of TCG_TEST_TARGETS based on
what actually was configured by meson. Rename the variable that
configure spits out to TCG_TESTS_WITH_COMPILERS for clarity and to
avoid larger churn in the Makefile.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure              | 6 +++---
 tests/Makefile.include | 9 +++++++++
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index a2f66f7ff9c..82cace1bc95 100755
--- a/configure
+++ b/configure
@@ -1801,7 +1801,7 @@ if test "$plugins" = "yes" ; then
 fi
 echo "PYTHON=$python" >> tests/tcg/$config_host_mak
 
-tcg_tests_targets=
+tcg_tests_with_compilers=
 for target in $target_list; do
   arch=${target%%-*}
 
@@ -1852,12 +1852,12 @@ for target in $target_list; do
       fi
 
       echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> Makefile.prereqs
-      tcg_tests_targets="$tcg_tests_targets $target"
+      tcg_tests_with_compilers="$tcg_tests_with_compilers $target"
   fi
 done
 
 if test "$tcg" = "enabled"; then
-    echo "TCG_TESTS_TARGETS=$tcg_tests_targets" >> $config_host_mak
+    echo "TCG_TESTS_WITH_COMPILERS=$tcg_tests_with_compilers" >> $config_host_mak
 fi
 
 if test "$skip_meson" = no; then
diff --git a/tests/Makefile.include b/tests/Makefile.include
index d4dfbf3716d..7728098981d 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -37,6 +37,15 @@ export SRC_PATH
 
 SPEED = quick
 
+
+# TCG_TESTS_WITH_COMPILERS represents the test targets we have cross compiler
+# support for, CONFIGURED_TEST_TARGETS it what meson has finally
+# configured having rejected stuff we can't build.
+CONFIGURED_TCG_TARGETS=$(patsubst %-config-target.h, %, $(wildcard *-config-target.h))
+
+# This is the intersection of what tests we can build and is configured
+TCG_TESTS_TARGETS=$(filter $(CONFIGURED_TCG_TARGETS), $(TCG_TESTS_WITH_COMPILERS))
+
 # Per guest TCG tests
 BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TCG_TESTS_TARGETS))
 CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(TCG_TESTS_TARGETS))
-- 
2.47.3



  parent reply	other threads:[~2025-12-04 19:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-04 19:48 [PATCH v2 00/11] Final fixes for 10.2 (build, docs, dockerfiles, plugins) Alex Bennée
2025-12-04 19:48 ` [PATCH v2 01/11] gitlab: drop --disable-pie from aarch64-all-linux-static build Alex Bennée
2025-12-05  7:53   ` Thomas Huth
2025-12-04 19:48 ` [PATCH v2 02/11] gitlab: drop explicit pxe-test from the build-tci job Alex Bennée
2025-12-05  7:54   ` Thomas Huth
2025-12-04 19:48 ` Alex Bennée [this message]
2025-12-04 19:48 ` [PATCH v2 04/11] tests/lcitool: add bzip2 to the minimal dependency list Alex Bennée
2025-12-05  6:14   ` Thomas Huth
2025-12-04 19:48 ` [PATCH v2 05/11] tests/lcitool: add nettle to the minimal deps Alex Bennée
2025-12-05  6:37   ` Thomas Huth
2025-12-05 12:48     ` Alex Bennée
2025-12-08  9:11       ` Daniel P. Berrangé
2025-12-08  9:17         ` Thomas Huth
2025-12-04 19:48 ` [PATCH v2 06/11] tests/docker: transition debian-all-test-cross to lcitool Alex Bennée
2025-12-04 19:48 ` [PATCH v2 07/11] tests/docker: drop --disable-[tools|system] from all-test-cross Alex Bennée
2025-12-05  6:40   ` Thomas Huth
2025-12-04 19:48 ` [PATCH v2 08/11] docs/devel: update build environment setup documentation Alex Bennée
2025-12-04 19:49 ` [PATCH v2 09/11] docs/devel: Correct typo Alex Bennée
2025-12-08  9:21   ` Philippe Mathieu-Daudé
2025-12-04 19:49 ` [PATCH v2 10/11] MAINTAINERS: update the custom runner entries Alex Bennée
2025-12-05  6:09   ` Thomas Huth
2025-12-08  9:20   ` Philippe Mathieu-Daudé
2025-12-04 19:49 ` [PATCH v2 11/11] plugins/core: allow reading of registers during discon events Alex Bennée

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251204194902.1340008-4-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=erdnaxe@crans.org \
    --cc=ma.mandourr@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).