diff options
author | Paolo Bonzini | 2022-04-19 11:10:12 +0200 |
---|---|---|
committer | Alex Bennée | 2022-04-20 17:04:20 +0200 |
commit | eebf199c09a250fc2e8ad2098b2687857569d9b3 (patch) | |
tree | 148649611f0c2c1e055dc7ba9724768cd88f1514 /tests/Makefile.include | |
parent | tests/tcg: list test targets in Makefile.prereqs (diff) | |
download | qemu-eebf199c09a250fc2e8ad2098b2687857569d9b3.tar.gz qemu-eebf199c09a250fc2e8ad2098b2687857569d9b3.tar.xz qemu-eebf199c09a250fc2e8ad2098b2687857569d9b3.zip |
tests/tcg: invoke Makefile.target directly from QEMU's makefile
Build the "docker.py cc" invocation directly in tests/tcg/configure.sh, and
remove the Makefile.qemu wrapper around Makefile.target. The config-*.mak
files now include the actual variables used when building the tests, rather
than the CROSS_* variables that Makefile.qemu used to "translate".
This is a first step towards generalizing the cross-compilation infrastructure
so that it can be used for firmware as well.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-15-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-18-alex.bennee@linaro.org>
Diffstat (limited to 'tests/Makefile.include')
-rw-r--r-- | tests/Makefile.include | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/tests/Makefile.include b/tests/Makefile.include index 091ca8513f..ec84b2ebc0 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -48,25 +48,27 @@ 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)) -$(BUILD_TCG_TARGET_RULES): build-tcg-tests-%: $(if $(CONFIG_PLUGIN),test-plugins) - $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \ - -f $(SRC_PATH)/tests/tcg/Makefile.qemu \ - SRC_PATH=$(SRC_PATH) \ - V="$(V)" TARGET="$*" guest-tests, \ - "BUILD", "TCG tests for $*") - -$(RUN_TCG_TARGET_RULES): run-tcg-tests-%: build-tcg-tests-% all - $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \ - -f $(SRC_PATH)/tests/tcg/Makefile.qemu \ - SRC_PATH=$(SRC_PATH) SPEED="$(SPEED)" \ - V="$(V)" TARGET="$*" run-guest-tests, \ - "RUN", "TCG tests for $*") - -$(CLEAN_TCG_TARGET_RULES): clean-tcg-tests-%: - $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \ - -f $(SRC_PATH)/tests/tcg/Makefile.qemu \ - SRC_PATH=$(SRC_PATH) TARGET="$*" clean-guest-tests, \ - "CLEAN", "TCG tests for $*") +.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, \ + $(MAKE) -C tests/tcg/$* -f ../Makefile.target $(SUBDIR_MAKEFLAGS) \ + DOCKER_SCRIPT="$(DOCKER_SCRIPT)" \ + TARGET="$*" SRC_PATH="$(SRC_PATH)", \ + "BUILD","$* guest-tests") + +.PHONY: $(TCG_TESTS_TARGETS:%=run-tcg-tests-%) +$(TCG_TESTS_TARGETS:%=run-tcg-tests-%): run-tcg-tests-%: build-tcg-tests-% $(if $(CONFIG_PLUGIN),test-plugins) + $(call quiet-command, \ + $(MAKE) -C tests/tcg/$* -f ../Makefile.target $(SUBDIR_MAKEFLAGS) \ + TARGET="$*" SRC_PATH="$(SRC_PATH)" SPEED=$(SPEED) run, \ + "RUN", "$* guest-tests") + +.PHONY: $(TCG_TESTS_TARGETS:%=clean-tcg-tests-%) +$(TCG_TESTS_TARGETS:%=clean-tcg-tests-%): clean-tcg-tests-%: + $(call quiet-command, \ + $(MAKE) -C tests/tcg/$* -f ../Makefile.target $(SUBDIR_MAKEFLAGS) \ + TARGET="$*" SRC_PATH="$(SRC_PATH)" clean, \ + "CLEAN", "$* guest-tests") .PHONY: build-tcg build-tcg: $(BUILD_TCG_TARGET_RULES) |