From: "Alex Bennée" <alex.bennee@linaro.org>
To: peter.maydell@linaro.org, richard.henderson@linaro.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
qemu-devel@nongnu.org, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PULL 16/25] tests/tcg: list test targets in Makefile.prereqs
Date: Wed, 20 Apr 2022 19:08:23 +0100 [thread overview]
Message-ID: <20220420180832.3812543-17-alex.bennee@linaro.org> (raw)
In-Reply-To: <20220420180832.3812543-1-alex.bennee@linaro.org>
From: Paolo Bonzini <pbonzini@redhat.com>
Omit the rules altogether for targets that do not have a compiler.
Makefile.qemu now is only invoked if the tests are actually built/run.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-14-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-17-alex.bennee@linaro.org>
diff --git a/tests/Makefile.include b/tests/Makefile.include
index b5d0d6bc98..091ca8513f 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -36,19 +36,16 @@ export SRC_PATH
SPEED = quick
-# Build up our target list from the filtered list of ninja targets
-TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa, $(ninja-targets)))
-
-include tests/tcg/Makefile.prereqs
config-host.mak: $(SRC_PATH)/tests/tcg/configure.sh
tests/tcg/Makefile.prereqs: config-host.mak
# Per guest TCG tests
-BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGETS))
-CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(TARGETS))
-RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGETS))
+BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TCG_TESTS_TARGETS))
+CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(TCG_TESTS_TARGETS))
+RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TCG_TESTS_TARGETS))
-$(foreach TARGET,$(TARGETS), \
+$(foreach TARGET,$(TCG_TESTS_TARGETS), \
$(eval $(BUILD_DIR)/tests/tcg/config-$(TARGET).mak: config-host.mak))
$(BUILD_TCG_TARGET_RULES): build-tcg-tests-%: $(if $(CONFIG_PLUGIN),test-plugins)
@@ -84,6 +81,9 @@ clean-tcg: $(CLEAN_TCG_TARGET_RULES)
.PHONY: check-venv check-avocado check-acceptance check-acceptance-deprecated-warning
+# Build up our target list from the filtered list of ninja targets
+TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa, $(ninja-targets)))
+
TESTS_VENV_DIR=$(BUILD_DIR)/tests/venv
TESTS_VENV_REQ=$(SRC_PATH)/tests/requirements.txt
TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results
diff --git a/tests/tcg/Makefile.qemu b/tests/tcg/Makefile.qemu
index 84c8543878..cda5e5a33e 100644
--- a/tests/tcg/Makefile.qemu
+++ b/tests/tcg/Makefile.qemu
@@ -95,7 +95,6 @@ all:
.PHONY: guest-tests
-ifneq ($(GUEST_BUILD),)
guest-tests: $(GUEST_BUILD)
run-guest-tests: guest-tests
@@ -105,16 +104,6 @@ run-guest-tests: guest-tests
SRC_PATH="$(SRC_PATH)" SPEED=$(SPEED) run), \
"RUN", "tests for $(TARGET_NAME)")
-else
-guest-tests:
- $(call quiet-command, true, "BUILD", \
- "$(TARGET) guest-tests SKIPPED")
-
-run-guest-tests:
- $(call quiet-command, true, "RUN", \
- "tests for $(TARGET) SKIPPED")
-endif
-
# It doesn't matter if these don't exits
.PHONY: clean-guest-tests
clean-guest-tests:
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index 904c351029..e51cd56b60 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -81,7 +81,9 @@ fi
: ${cross_ld_tricore="tricore-ld"}
makefile=tests/tcg/Makefile.prereqs
-: > $makefile
+echo "# Automatically generated by configure - do not modify" > $makefile
+
+tcg_tests_targets=
for target in $target_list; do
arch=${target%%-*}
@@ -228,6 +230,7 @@ for target in $target_list; do
echo "target=$target" >> $config_target_mak
case $target in
*-softmmu)
+ test -f $source_path/tests/tcg/$arch/Makefile.softmmu-target || continue
qemu="qemu-system-$arch"
;;
*-linux-user|*-bsd-user)
@@ -235,11 +238,7 @@ for target in $target_list; do
;;
esac
- echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> $makefile
-
eval "target_compiler_cflags=\${cross_cc_cflags_$arch}"
- echo "QEMU=$PWD/$qemu" >> $config_target_mak
- echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak
got_cross_cc=no
@@ -362,8 +361,16 @@ for target in $target_list; do
echo "CROSS_CC_HAS_I386_NOPIE=y" >> $config_target_mak
;;
esac
+ got_cross_cc=yes
break
fi
done
fi
+ if test $got_cross_cc = yes; then
+ echo "QEMU=$PWD/$qemu" >> $config_target_mak
+ echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak
+ echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> $makefile
+ tcg_tests_targets="$tcg_tests_targets $target"
+ fi
done
+echo "TCG_TESTS_TARGETS=$tcg_tests_targets" >> $makefile
--
2.30.2
next prev parent reply other threads:[~2022-04-20 18:46 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 18:08 [PULL 00/25] Various testing, doc and gdbstub fixes Alex Bennée
2022-04-20 18:08 ` [PULL 01/25] tests/avocado: update aarch64_virt test to exercise -cpu max Alex Bennée
2022-04-20 18:08 ` [PULL 02/25] docs/devel: add some notes on the binfmt-image-debian targets Alex Bennée
2022-04-20 18:08 ` [PULL 03/25] docs/devel: drop :hidden: and :includehidden: tags Alex Bennée
2022-04-20 18:08 ` [PULL 04/25] tests/docker: remove dead code for linux-user containers Alex Bennée
2022-04-20 18:08 ` [PULL 05/25] tests/docker: remove test targets Alex Bennée
2022-04-20 18:08 ` [PULL 06/25] tests/docker: remove dead variable Alex Bennée
2022-04-20 18:08 ` [PULL 07/25] tests/docker: remove unnecessary default definitions Alex Bennée
2022-04-20 18:08 ` [PULL 08/25] tests/docker: inline variable definitions or move close to use Alex Bennée
2022-04-20 18:08 ` [PULL 09/25] tests/docker: remove unnecessary filtering of $(DOCKER_IMAGES) Alex Bennée
2022-04-20 18:08 ` [PULL 10/25] tests/docker: simplify docker-TEST@IMAGE targets Alex Bennée
2022-04-20 18:08 ` [PULL 11/25] tests/docker: do not duplicate rules for hexagon-cross Alex Bennée
2022-04-20 18:08 ` [PULL 12/25] tests/tcg: add compiler test variables when using containers Alex Bennée
2022-04-20 18:08 ` [PULL 13/25] tests/tcg: remove CONFIG_LINUX_USER from config-target.mak Alex Bennée
2022-04-20 18:08 ` [PULL 14/25] tests/tcg: remove CONFIG_USER_ONLY " Alex Bennée
2022-04-20 18:08 ` [PULL 15/25] tests/tcg: prepare Makefile.prereqs at configure time Alex Bennée
2022-04-20 18:08 ` Alex Bennée [this message]
2022-04-20 18:08 ` [PULL 17/25] tests/tcg: invoke Makefile.target directly from QEMU's makefile Alex Bennée
2022-04-20 18:08 ` [PULL 18/25] tests/tcg: isolate from QEMU's config-host.mak Alex Bennée
2022-04-20 18:08 ` [PULL 19/25] tests/docker: remove SKIP_DOCKER_BUILD Alex Bennée
2022-04-20 18:08 ` [PULL 20/25] tests/tcg: fix non-static build Alex Bennée
2022-04-20 18:08 ` [PULL 21/25] tests/tcg: remove duplicate sha512-sse case Alex Bennée
2022-04-20 18:08 ` [PULL 22/25] tests/tcg: add float_convd test Alex Bennée
2022-04-20 18:08 ` [PULL 23/25] tests/tcg: add missing reference files for float_convs Alex Bennée
2022-04-20 18:08 ` [PULL 24/25] target/i386: fix byte swap issue with XMM register access Alex Bennée
2022-04-20 18:08 ` [PULL 25/25] tests/guest-debug: better handle gdb crashes Alex Bennée
2022-04-20 19:46 ` [PULL 00/25] Various testing, doc and gdbstub fixes Richard Henderson
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=20220420180832.3812543-17-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=f4bug@amsat.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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).