]> git.proxmox.com Git - mirror_qemu.git/blob - tests/tcg/multiarch/Makefile.target
Merge tag 'm68k-next-pull-request' of https://github.com/vivier/qemu-m68k into staging
[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 ifeq ($(filter %-linux-user, $(TARGET)),$(TARGET))
14 VPATH += $(MULTIARCH_SRC)/linux
15 MULTIARCH_SRCS += $(notdir $(wildcard $(MULTIARCH_SRC)/linux/*.c))
16 endif
17 MULTIARCH_TESTS = $(MULTIARCH_SRCS:.c=)
18
19 #
20 # The following are any additional rules needed to build things
21 #
22
23
24 float_%: LDFLAGS+=-lm
25 float_%: float_%.c libs/float_helpers.c
26 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< $(MULTIARCH_SRC)/libs/float_helpers.c -o $@ $(LDFLAGS)
27
28 run-float_%: float_%
29 $(call run-test,$<, $(QEMU) $(QEMU_OPTS) $<)
30 $(call conditional-diff-out,$<,$(SRC_PATH)/tests/tcg/$(TARGET_NAME)/$<.ref)
31
32
33 testthread: LDFLAGS+=-lpthread
34
35 threadcount: LDFLAGS+=-lpthread
36
37 signals: LDFLAGS+=-lrt -lpthread
38
39 munmap-pthread: CFLAGS+=-pthread
40 munmap-pthread: LDFLAGS+=-pthread
41
42 vma-pthread: CFLAGS+=-pthread
43 vma-pthread: LDFLAGS+=-pthread
44
45 # The vma-pthread seems very sensitive on gitlab and we currently
46 # don't know if its exposing a real bug or the test is flaky.
47 ifneq ($(GITLAB_CI),)
48 run-vma-pthread: vma-pthread
49 $(call skip-test, $<, "flaky on CI?")
50 run-plugin-vma-pthread-with-%: vma-pthread
51 $(call skip-test, $<, "flaky on CI?")
52 endif
53
54 # We define the runner for test-mmap after the individual
55 # architectures have defined their supported pages sizes. If no
56 # additional page sizes are defined we only run the default test.
57
58 # default case (host page size)
59 run-test-mmap: test-mmap
60 $(call run-test, test-mmap, $(QEMU) $<, $< (default))
61
62 # additional page sizes (defined by each architecture adding to EXTRA_RUNS)
63 run-test-mmap-%: test-mmap
64 $(call run-test, test-mmap-$*, $(QEMU) -p $* $<, $< ($* byte pages))
65
66 ifneq ($(HAVE_GDB_BIN),)
67 GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
68
69 run-gdbstub-sha1: sha1
70 $(call run-test, $@, $(GDB_SCRIPT) \
71 --gdb $(HAVE_GDB_BIN) \
72 --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
73 --bin $< --test $(MULTIARCH_SRC)/gdbstub/sha1.py, \
74 basic gdbstub support)
75
76 run-gdbstub-qxfer-auxv-read: sha1
77 $(call run-test, $@, $(GDB_SCRIPT) \
78 --gdb $(HAVE_GDB_BIN) \
79 --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
80 --bin $< --test $(MULTIARCH_SRC)/gdbstub/test-qxfer-auxv-read.py, \
81 basic gdbstub qXfer:auxv:read support)
82
83 run-gdbstub-thread-breakpoint: testthread
84 $(call run-test, $@, $(GDB_SCRIPT) \
85 --gdb $(HAVE_GDB_BIN) \
86 --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
87 --bin $< --test $(MULTIARCH_SRC)/gdbstub/test-thread-breakpoint.py, \
88 hitting a breakpoint on non-main thread)
89
90 else
91 run-gdbstub-%:
92 $(call skip-test, "gdbstub test $*", "need working gdb")
93 endif
94 EXTRA_RUNS += run-gdbstub-sha1 run-gdbstub-qxfer-auxv-read \
95 run-gdbstub-thread-breakpoint
96
97 # ARM Compatible Semi Hosting Tests
98 #
99 # Despite having ARM in the name we actually have several
100 # architectures that implement it. We gate the tests on the feature
101 # appearing in config.
102 #
103 ifeq ($(CONFIG_ARM_COMPATIBLE_SEMIHOSTING),y)
104 VPATH += $(MULTIARCH_SRC)/arm-compat-semi
105
106 # Add -I path back to TARGET_NAME for semicall.h
107 semihosting: CFLAGS+=-I$(SRC_PATH)/tests/tcg/$(TARGET_NAME)
108
109 run-semihosting: semihosting
110 $(call run-test,$<,$(QEMU) $< 2> $<.err)
111
112 run-plugin-semihosting-with-%:
113 $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
114 -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
115 $(call strip-plugin,$<) 2> $<.err, \
116 $< with $*)
117
118 semiconsole: CFLAGS+=-I$(SRC_PATH)/tests/tcg/$(TARGET_NAME)
119
120 run-semiconsole: semiconsole
121 $(call skip-test, $<, "MANUAL ONLY")
122
123 run-plugin-semiconsole-with-%:
124 $(call skip-test, $<, "MANUAL ONLY")
125
126 TESTS += semihosting semiconsole
127 endif
128
129 # Update TESTS
130 TESTS += $(MULTIARCH_TESTS)