]> git.proxmox.com Git - mirror_qemu.git/blobdiff - tests/tcg/multiarch/Makefile.target
semihosting: move semihosting tests to multiarch
[mirror_qemu.git] / tests / tcg / multiarch / Makefile.target
index abbdb2e12655987ea3761126b15c221e6636819f..a3a751723da183eec6d253a356d7e03d11dfdea3 100644 (file)
@@ -69,6 +69,37 @@ run-gdbstub-%:
 endif
 EXTRA_RUNS += run-gdbstub-sha1 run-gdbstub-qxfer-auxv-read
 
+# ARM Compatible Semi Hosting Tests
+#
+# Despite having ARM in the name we actually have several
+# architectures that implement it. We gate the tests on the feature
+# appearing in config.
+#
+ifeq ($(CONFIG_ARM_COMPATIBLE_SEMIHOSTING),y)
+VPATH += $(MULTIARCH_SRC)/arm-compat-semi
+
+# Add -I path back to TARGET_NAME for semicall.h
+semihosting: CFLAGS+=-I$(SRC_PATH)/tests/tcg/$(TARGET_NAME)
+
+run-semihosting: semihosting
+       $(call run-test,$<,$(QEMU) $< 2> $<.err, "$< on $(TARGET_NAME)")
+
+run-plugin-semihosting-with-%:
+       $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
+               -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
+                $(call strip-plugin,$<) 2> $<.err, \
+               "$< on $(TARGET_NAME) with $*")
+
+semiconsole: CFLAGS+=-I$(SRC_PATH)/tests/tcg/$(TARGET_NAME)
+
+run-semiconsole: semiconsole
+       $(call skip-test, $<, "MANUAL ONLY")
+
+run-plugin-semiconsole-with-%:
+       $(call skip-test, $<, "MANUAL ONLY")
+
+TESTS += semihosting semiconsole
+endif
 
 # Update TESTS
 TESTS += $(MULTIARCH_TESTS)