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 dependencies 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),) 18ifeq ($(HOST_GDB_SUPPORTS_ARCH),y) 19GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py 20 21run-gdbstub-memory: memory 22 $(call run-test, $@, $(GDB_SCRIPT) \ 23 --gdb $(HAVE_GDB_BIN) \ 24 --qemu $(QEMU) \ 25 --output $<.gdb.out \ 26 --qargs \ 27 "-monitor none -display none -chardev file$(COMMA)path=$<.out$(COMMA)id=output $(QEMU_OPTS)" \ 28 --bin $< --test $(MULTIARCH_SRC)/gdbstub/memory.py, \ 29 softmmu gdbstub support) 30 31run-gdbstub-untimely-packet: hello 32 $(call run-test, $@, $(GDB_SCRIPT) \ 33 --gdb $(HAVE_GDB_BIN) \ 34 --gdb-args "-ex 'set debug remote 1'" \ 35 --output untimely-packet.gdb.out \ 36 --stderr untimely-packet.gdb.err \ 37 --qemu $(QEMU) \ 38 --bin $< --qargs \ 39 "-monitor none -display none -chardev file$(COMMA)path=untimely-packet.out$(COMMA)id=output $(QEMU_OPTS)", \ 40 "softmmu gdbstub untimely packets") 41 $(call quiet-command, \ 42 (! grep -Fq 'Packet instead of Ack, ignoring it' untimely-packet.gdb.err), \ 43 "GREP", "file untimely-packet.gdb.err") 44else 45run-gdbstub-%: 46 $(call skip-test, "gdbstub test $*", "no guest arch support") 47endif 48else 49run-gdbstub-%: 50 $(call skip-test, "gdbstub test $*", "need working gdb") 51endif 52 53MULTIARCH_RUNS += run-gdbstub-memory run-gdbstub-untimely-packet 54