1# -*- Mode: makefile -*-
2#
3# Multiarch system tests
4#
5# We just collect the tests together here and rely on the actual guest
6# architecture to add to the test dependancies and deal with the
7# complications of building.
8#
9
10MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
11MULTIARCH_SYSTEM_SRC=$(MULTIARCH_SRC)/system
12VPATH+=$(MULTIARCH_SYSTEM_SRC)
13
14MULTIARCH_TEST_SRCS=$(wildcard $(MULTIARCH_SYSTEM_SRC)/*.c)
15MULTIARCH_TESTS = $(patsubst $(MULTIARCH_SYSTEM_SRC)/%.c, %, $(MULTIARCH_TEST_SRCS))
16
17ifneq ($(HAVE_GDB_BIN),)
18GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
19
20run-gdbstub-memory: memory
21	$(call run-test, $@, $(GDB_SCRIPT) \
22		--gdb $(HAVE_GDB_BIN) \
23		--qemu $(QEMU) \
24		--output $<.gdb.out \
25		--qargs \
26		"-monitor none -display none -chardev file$(COMMA)path=$<.out$(COMMA)id=output $(QEMU_OPTS)" \
27		--bin $< --test $(MULTIARCH_SRC)/gdbstub/memory.py, \
28	softmmu gdbstub support)
29
30else
31run-gdbstub-%:
32	$(call skip-test, "gdbstub test $*", "need working gdb")
33endif
34
35MULTIARCH_RUNS += run-gdbstub-memory
36