aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg/multiarch/Makefile.target
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2018-04-05 15:03:22 +0100
committerAlex Bennée <alex.bennee@linaro.org>2018-06-20 20:22:34 +0100
commitdd28bebd024b4c7cfb6352126cd010d389a8d374 (patch)
treee6396a4e43bf7f44eefeae6b35faf134e326ce58 /tests/tcg/multiarch/Makefile.target
parente27cae268fc18a22b7842fae1fe8257df704741a (diff)
downloadqemu-dd28bebd024b4c7cfb6352126cd010d389a8d374.zip
qemu-dd28bebd024b4c7cfb6352126cd010d389a8d374.tar.gz
qemu-dd28bebd024b4c7cfb6352126cd010d389a8d374.tar.bz2
tests/tcg: move architecture independent tests into subdir
We will want to build these for all supported guest architectures so lets move them all into one place. We also drop test_path at this point because it needs qemu utils and glib bits which is hard to support for cross compiling. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tests/tcg/multiarch/Makefile.target')
-rw-r--r--tests/tcg/multiarch/Makefile.target36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target
new file mode 100644
index 0000000..90e45a8
--- /dev/null
+++ b/tests/tcg/multiarch/Makefile.target
@@ -0,0 +1,36 @@
+# -*- Mode: makefile -*-
+#
+# Multiarch Tests - included from tests/tcg/Makefile.target
+#
+# These tests are plain C and built without any architecture specific code.
+#
+
+MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
+
+# Set search path for all sources
+VPATH += $(MULTIARCH_SRC)
+MULTIARCH_SRCS =$(notdir $(wildcard $(MULTIARCH_SRC)/*.c))
+MULTIARCH_TESTS =$(MULTIARCH_SRCS:.c=)
+
+# Update TESTS
+TESTS +=$(MULTIARCH_TESTS)
+
+#
+# The following are any additional rules needed to build things
+#
+
+testthread: LDFLAGS+=-lpthread
+
+# We define the runner for test-mmap after the individual
+# architectures have defined their supported pages sizes. If no
+# additional page sizes are defined we only run the default test.
+
+# default case (host page size)
+run-test-mmap: test-mmap
+ $(call quiet-command, $(QEMU) $< > test-mmap.out, "TEST", \
+ "$< (default) on $(TARGET_NAME)")
+
+# additional page sizes (defined by each architecture adding to EXTRA_RUNS)
+run-test-mmap-%: test-mmap
+ $(call quiet-command, $(QEMU) -p $* $< > test-mmap-$*.out, "TEST", \
+ "$< ($* byte pages) on $(TARGET_NAME)")