summaryrefslogtreecommitdiffstats
path: root/tests/Makefile.include
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Makefile.include')
-rw-r--r--tests/Makefile.include40
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)