tests/tcg: also disable the signals test for plugins
[qemu.git] / tests / tcg / multiarch / Makefile.target
blob85a6fb7a2ea019a409fda2c5876c1a55a34b1ab3
1 # -*- Mode: makefile -*-
3 # Multiarch Tests - included from tests/tcg/Makefile.target
5 # These tests are plain C and built without any architecture specific code.
8 MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
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=))
16 # The following are any additional rules needed to build things
20 float_%: LDFLAGS+=-lm
21 float_%: float_%.c float_helpers.c
22         $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< $(MULTIARCH_SRC)/float_helpers.c -o $@ $(LDFLAGS)
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)
29 testthread: LDFLAGS+=-lpthread
31 threadcount: LDFLAGS+=-lpthread
33 signals: LDFLAGS+=-lrt -lpthread
35 # This triggers failures on s390x hosts about 4% of the time
36 # This triggers failures for hppa-linux about 1% of the time
37 run-signals: signals
38         $(call skip-test, $<, "BROKEN awaiting sigframe clean-ups and vdso support")
40 run-plugin-signals-with-%:
41         $(call skip-test, $<, "BROKEN awaiting sigframe clean-ups and vdso support")
43 # We define the runner for test-mmap after the individual
44 # architectures have defined their supported pages sizes. If no
45 # additional page sizes are defined we only run the default test.
47 # default case (host page size)
48 run-test-mmap: test-mmap
49         $(call run-test, test-mmap, $(QEMU) $<, \
50                 "$< (default) on $(TARGET_NAME)")
52 # additional page sizes (defined by each architecture adding to EXTRA_RUNS)
53 run-test-mmap-%: test-mmap
54         $(call run-test, test-mmap-$*, $(QEMU) -p $* $<,\
55                 "$< ($* byte pages) on $(TARGET_NAME)")
57 ifneq ($(HAVE_GDB_BIN),)
58 GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
60 run-gdbstub-sha1: sha1
61         $(call run-test, $@, $(GDB_SCRIPT) \
62                 --gdb $(HAVE_GDB_BIN) \
63                 --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
64                 --bin $< --test $(MULTIARCH_SRC)/gdbstub/sha1.py, \
65         "basic gdbstub support")
67 EXTRA_RUNS += run-gdbstub-sha1
69 run-gdbstub-qxfer-auxv-read: sha1
70         $(call run-test, $@, $(GDB_SCRIPT) \
71                 --gdb $(HAVE_GDB_BIN) \
72                 --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
73                 --bin $< --test $(MULTIARCH_SRC)/gdbstub/test-qxfer-auxv-read.py, \
74         "basic gdbstub qXfer:auxv:read support")
76 else
77 run-gdbstub-%:
78         $(call skip-test, "gdbstub test $*", "need working gdb")
79 endif
80 EXTRA_RUNS += run-gdbstub-sha1 run-gdbstub-qxfer-auxv-read
82 # ARM Compatible Semi Hosting Tests
84 # Despite having ARM in the name we actually have several
85 # architectures that implement it. We gate the tests on the feature
86 # appearing in config.
88 ifeq ($(CONFIG_ARM_COMPATIBLE_SEMIHOSTING),y)
89 VPATH += $(MULTIARCH_SRC)/arm-compat-semi
91 # Add -I path back to TARGET_NAME for semicall.h
92 semihosting: CFLAGS+=-I$(SRC_PATH)/tests/tcg/$(TARGET_NAME)
94 run-semihosting: semihosting
95         $(call run-test,$<,$(QEMU) $< 2> $<.err, "$< on $(TARGET_NAME)")
97 run-plugin-semihosting-with-%:
98         $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
99                 -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
100                  $(call strip-plugin,$<) 2> $<.err, \
101                 "$< on $(TARGET_NAME) with $*")
103 semiconsole: CFLAGS+=-I$(SRC_PATH)/tests/tcg/$(TARGET_NAME)
105 run-semiconsole: semiconsole
106         $(call skip-test, $<, "MANUAL ONLY")
108 run-plugin-semiconsole-with-%:
109         $(call skip-test, $<, "MANUAL ONLY")
111 TESTS += semihosting semiconsole
112 endif
114 # Update TESTS
115 TESTS += $(MULTIARCH_TESTS)