[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v3 23/28] tests/tcg: Do not build/run TCG tests if TCG is dis
From: |
Fabiano Rosas |
Subject: |
[RFC PATCH v3 23/28] tests/tcg: Do not build/run TCG tests if TCG is disabled |
Date: |
Fri, 13 Jan 2023 11:04:14 -0300 |
The tests under tests/tcg depend on the TCG accelerator. Do not build
them if --disable-tcg was given in the configure line.
Test against CONFIG_TCG='' instead of CONFIG_TCG=y to account for
CONFIG_TCG=m.
sample output:
$ make check-tcg
GIT ui/keycodemapdb meson dtc
SKIPPED x86_64-softmmu guest-tests because TCG is disabled in this build
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
configure | 4 ++++
tests/Makefile.include | 10 ++++++++++
2 files changed, 14 insertions(+)
diff --git a/configure b/configure
index 9e407ce2e3..a6f9892757 100755
--- a/configure
+++ b/configure
@@ -2352,6 +2352,10 @@ if test "$plugins" = "yes" ; then
echo "CONFIG_PLUGIN=y" >> $config_host_mak
fi
+if test "$tcg" = "enabled" ; then
+ echo "CONFIG_TCG=y" >> $config_host_mak
+fi
+
if test -n "$gdb_bin"; then
gdb_version=$($gdb_bin --version | head -n 1)
if version_ge ${gdb_version##* } 9.1; then
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 9422ddaece..aa0e610cf2 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -45,6 +45,7 @@ RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%,
$(TCG_TESTS_TARGETS))
$(foreach TARGET,$(TCG_TESTS_TARGETS), \
$(eval $(BUILD_DIR)/tests/tcg/config-$(TARGET).mak: config-host.mak))
+ifneq ($(CONFIG_TCG),)
.PHONY: $(TCG_TESTS_TARGETS:%=build-tcg-tests-%)
$(TCG_TESTS_TARGETS:%=build-tcg-tests-%): build-tcg-tests-%:
$(BUILD_DIR)/tests/tcg/config-%.mak
$(call quiet-command, \
@@ -56,6 +57,15 @@ $(TCG_TESTS_TARGETS:%=run-tcg-tests-%): run-tcg-tests-%:
build-tcg-tests-%
$(call quiet-command, \
$(MAKE) -C tests/tcg/$* $(SUBDIR_MAKEFLAGS) SPEED=$(SPEED) run, \
"RUN", "$* guest-tests")
+else
+.PHONY: $(TCG_TESTS_TARGETS:%=build-tcg-tests-%)
+$(TCG_TESTS_TARGETS:%=build-tcg-tests-%):
+ @echo " SKIPPED $(subst build-tcg-tests-,,$@) guest-tests because TCG
is disabled in this build"
+
+.PHONY: $(TCG_TESTS_TARGETS:%=run-tcg-tests-%)
+$(TCG_TESTS_TARGETS:%=run-tcg-tests-%):
+ @echo " SKIPPED $(subst run-tcg-tests-,,$@) guest-tests because TCG is
disabled in this build"
+endif
.PHONY: $(TCG_TESTS_TARGETS:%=clean-tcg-tests-%)
$(TCG_TESTS_TARGETS:%=clean-tcg-tests-%): clean-tcg-tests-%:
--
2.35.3
[RFC PATCH v3 22/28] tests/qtest: Restrict bcm2835-dma-test to CONFIG_RASPI, Fabiano Rosas, 2023/01/13
[RFC PATCH v3 23/28] tests/tcg: Do not build/run TCG tests if TCG is disabled,
Fabiano Rosas <=
[RFC PATCH v3 24/28] tests/avocado: Skip tests that require a missing accelerator, Fabiano Rosas, 2023/01/13
[RFC PATCH v3 25/28] tests/avocado: Tag TCG tests with accel:tcg, Fabiano Rosas, 2023/01/13
[RFC PATCH v3 26/28] target/avocado: Pass parameters to migration test on aarch64, Fabiano Rosas, 2023/01/13
[RFC PATCH v3 27/28] arm/Kconfig: Always select SEMIHOSTING when TCG is present, Fabiano Rosas, 2023/01/13
[RFC PATCH v3 28/28] arm/Kconfig: Do not build TCG-only boards on a KVM-only build, Fabiano Rosas, 2023/01/13