xref: /qemu/tests/tcg/multiarch/Makefile.target (revision 12b35405)
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
8MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
9
10# Set search path for all sources
11VPATH 		+= $(MULTIARCH_SRC)
12MULTIARCH_SRCS   =$(notdir $(wildcard $(MULTIARCH_SRC)/*.c))
13MULTIARCH_TESTS  =$(filter-out float_helpers, $(MULTIARCH_SRCS:.c=))
14
15#
16# The following are any additional rules needed to build things
17#
18
19
20float_%: LDFLAGS+=-lm
21float_%: float_%.c float_helpers.c
22	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< $(MULTIARCH_SRC)/float_helpers.c -o $@ $(LDFLAGS)
23
24run-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
29testthread: LDFLAGS+=-lpthread
30
31threadcount: LDFLAGS+=-lpthread
32
33# We define the runner for test-mmap after the individual
34# architectures have defined their supported pages sizes. If no
35# additional page sizes are defined we only run the default test.
36
37# default case (host page size)
38run-test-mmap: test-mmap
39	$(call run-test, test-mmap, $(QEMU) $<, \
40		"$< (default) on $(TARGET_NAME)")
41
42# additional page sizes (defined by each architecture adding to EXTRA_RUNS)
43run-test-mmap-%: test-mmap
44	$(call run-test, test-mmap-$*, $(QEMU) -p $* $<,\
45		"$< ($* byte pages) on $(TARGET_NAME)")
46
47ifneq ($(HAVE_GDB_BIN),)
48GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
49
50run-gdbstub-sha1: sha1
51	$(call run-test, $@, $(GDB_SCRIPT) \
52		--gdb $(HAVE_GDB_BIN) \
53		--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
54		--bin $< --test $(MULTIARCH_SRC)/gdbstub/sha1.py, \
55	"basic gdbstub support")
56
57EXTRA_RUNS += run-gdbstub-sha1
58endif
59
60
61# Update TESTS
62TESTS += $(MULTIARCH_TESTS)
63