]> git.proxmox.com Git - mirror_qemu.git/blob - tests/tcg/multiarch/Makefile.target
tests/tcg/multiarch: Re-enable signals test for most guests
[mirror_qemu.git] / tests / tcg / multiarch / Makefile.target
1 # -*- Mode: makefile -*-
2 #
3 # Multiarch Tests - included from tests/tcg/Makefile.target
4 #
5 # These tests are plain C and built without any architecture specific code.
6 #
7
8 MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
9
10 # Set search path for all sources
11 VPATH += $(MULTIARCH_SRC)
12 MULTIARCH_SRCS =$(notdir $(wildcard $(MULTIARCH_SRC)/*.c))
13 MULTIARCH_TESTS =$(filter-out float_helpers, $(MULTIARCH_SRCS:.c=))
14
15 #
16 # The following are any additional rules needed to build things
17 #
18
19
20 float_%: LDFLAGS+=-lm
21 float_%: float_%.c float_helpers.c
22 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< $(MULTIARCH_SRC)/float_helpers.c -o $@ $(LDFLAGS)
23
24 run-float_%: float_%
25 $(call run-test,$<, $(QEMU) $(QEMU_OPTS) $<,"$< on $(TARGET_NAME)")
26 $(call conditional-diff-out,$<,$(SRC_PATH)/tests/tcg/$(TARGET_NAME)/$<.ref)
27
28
29 testthread: LDFLAGS+=-lpthread
30
31 threadcount: LDFLAGS+=-lpthread
32
33 signals: LDFLAGS+=-lrt -lpthread
34
35 # We define the runner for test-mmap after the individual
36 # architectures have defined their supported pages sizes. If no
37 # additional page sizes are defined we only run the default test.
38
39 # default case (host page size)
40 run-test-mmap: test-mmap
41 $(call run-test, test-mmap, $(QEMU) $<, \
42 "$< (default) on $(TARGET_NAME)")
43
44 # additional page sizes (defined by each architecture adding to EXTRA_RUNS)
45 run-test-mmap-%: test-mmap
46 $(call run-test, test-mmap-$*, $(QEMU) -p $* $<,\
47 "$< ($* byte pages) on $(TARGET_NAME)")
48
49 ifneq ($(HAVE_GDB_BIN),)
50 GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
51
52 run-gdbstub-sha1: sha1
53 $(call run-test, $@, $(GDB_SCRIPT) \
54 --gdb $(HAVE_GDB_BIN) \
55 --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
56 --bin $< --test $(MULTIARCH_SRC)/gdbstub/sha1.py, \
57 "basic gdbstub support")
58
59 EXTRA_RUNS += run-gdbstub-sha1
60
61 run-gdbstub-qxfer-auxv-read: sha1
62 $(call run-test, $@, $(GDB_SCRIPT) \
63 --gdb $(HAVE_GDB_BIN) \
64 --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
65 --bin $< --test $(MULTIARCH_SRC)/gdbstub/test-qxfer-auxv-read.py, \
66 "basic gdbstub qXfer:auxv:read support")
67
68 else
69 run-gdbstub-%:
70 $(call skip-test, "gdbstub test $*", "need working gdb")
71 endif
72 EXTRA_RUNS += run-gdbstub-sha1 run-gdbstub-qxfer-auxv-read
73
74 # ARM Compatible Semi Hosting Tests
75 #
76 # Despite having ARM in the name we actually have several
77 # architectures that implement it. We gate the tests on the feature
78 # appearing in config.
79 #
80 ifeq ($(CONFIG_ARM_COMPATIBLE_SEMIHOSTING),y)
81 VPATH += $(MULTIARCH_SRC)/arm-compat-semi
82
83 # Add -I path back to TARGET_NAME for semicall.h
84 semihosting: CFLAGS+=-I$(SRC_PATH)/tests/tcg/$(TARGET_NAME)
85
86 run-semihosting: semihosting
87 $(call run-test,$<,$(QEMU) $< 2> $<.err, "$< on $(TARGET_NAME)")
88
89 run-plugin-semihosting-with-%:
90 $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
91 -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
92 $(call strip-plugin,$<) 2> $<.err, \
93 "$< on $(TARGET_NAME) with $*")
94
95 semiconsole: CFLAGS+=-I$(SRC_PATH)/tests/tcg/$(TARGET_NAME)
96
97 run-semiconsole: semiconsole
98 $(call skip-test, $<, "MANUAL ONLY")
99
100 run-plugin-semiconsole-with-%:
101 $(call skip-test, $<, "MANUAL ONLY")
102
103 TESTS += semihosting semiconsole
104 endif
105
106 # Update TESTS
107 TESTS += $(MULTIARCH_TESTS)