tests/tcg: add simple record/replay smoke test for aarch64
[qemu/ar7.git] / tests / tcg / aarch64 / Makefile.softmmu-target
blobb4b39579634ab822ba4ace157b5d9e791d57248e
2 # Aarch64 system tests
5 AARCH64_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/aarch64/system
6 VPATH+=$(AARCH64_SYSTEM_SRC)
8 # These objects provide the basic boot code and helper functions for all tests
9 CRT_OBJS=boot.o
11 AARCH64_TEST_SRCS=$(wildcard $(AARCH64_SYSTEM_SRC)/*.c)
12 AARCH64_TESTS = $(patsubst $(AARCH64_SYSTEM_SRC)/%.c, %, $(AARCH64_TEST_SRCS))
14 CRT_PATH=$(AARCH64_SYSTEM_SRC)
15 LINK_SCRIPT=$(AARCH64_SYSTEM_SRC)/kernel.ld
16 LDFLAGS=-Wl,-T$(LINK_SCRIPT)
17 TESTS+=$(AARCH64_TESTS) $(MULTIARCH_TESTS)
18 CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC)
19 LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
21 # building head blobs
22 .PRECIOUS: $(CRT_OBJS)
24 %.o: $(CRT_PATH)/%.S
25         $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@
27 # Build and link the tests
28 %: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
29         $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
31 memory: CFLAGS+=-DCHECK_UNALIGNED=1
33 # Running
34 QEMU_OPTS+=-M virt -cpu max -display none -semihosting-config enable=on,target=native,chardev=output -kernel
36 # Simple Record/Replay Test
37 .PHONY: memory-record
38 run-memory-record: memory-record memory
39         $(call run-test, $<, \
40           $(QEMU) -monitor none -display none \
41                   -chardev file$(COMMA)path=$<.out$(COMMA)id=output \
42                   -icount shift=5$(COMMA)rr=record$(COMMA)rrfile=record.bin \
43                   $(QEMU_OPTS) memory, \
44           "$< on $(TARGET_NAME)")
46 .PHONY: memory-replay
47 run-memory-replay: memory-replay run-memory-record
48         $(call run-test, $<, \
49           $(QEMU) -monitor none -display none \
50                   -chardev file$(COMMA)path=$<.out$(COMMA)id=output \
51                   -icount shift=5$(COMMA)rr=replay$(COMMA)rrfile=record.bin \
52                   $(QEMU_OPTS) memory, \
53           "$< on $(TARGET_NAME)")
55 TESTS+=memory-record memory-replay