2018-04-05 16:03:22 +02:00
|
|
|
# -*- Mode: makefile -*-
|
|
|
|
#
|
|
|
|
# Multiarch Tests - included from tests/tcg/Makefile.target
|
|
|
|
#
|
|
|
|
# These tests are plain C and built without any architecture specific code.
|
|
|
|
#
|
|
|
|
|
|
|
|
MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
|
|
|
|
|
|
|
|
# Set search path for all sources
|
|
|
|
VPATH += $(MULTIARCH_SRC)
|
|
|
|
MULTIARCH_SRCS =$(notdir $(wildcard $(MULTIARCH_SRC)/*.c))
|
2019-09-13 13:12:17 +02:00
|
|
|
MULTIARCH_TESTS =$(filter-out float_helpers, $(MULTIARCH_SRCS:.c=))
|
2018-04-05 16:03:22 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# The following are any additional rules needed to build things
|
|
|
|
#
|
|
|
|
|
2019-09-13 13:12:17 +02:00
|
|
|
|
2019-09-16 15:50:56 +02:00
|
|
|
float_%: LDFLAGS+=-lm
|
|
|
|
float_%: float_%.c float_helpers.c
|
2019-09-13 13:12:17 +02:00
|
|
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< $(MULTIARCH_SRC)/float_helpers.c -o $@ $(LDFLAGS)
|
|
|
|
|
2019-09-16 15:50:56 +02:00
|
|
|
run-float_%: float_%
|
2019-09-13 13:12:17 +02:00
|
|
|
$(call run-test,$<, $(QEMU) $(QEMU_OPTS) $<,"$< on $(TARGET_NAME)")
|
|
|
|
$(call conditional-diff-out,$<,$(SRC_PATH)/tests/tcg/$(TARGET_NAME)/$<.ref)
|
|
|
|
|
|
|
|
|
2018-04-05 16:03:22 +02:00
|
|
|
testthread: LDFLAGS+=-lpthread
|
|
|
|
|
2020-05-20 16:05:40 +02:00
|
|
|
threadcount: LDFLAGS+=-lpthread
|
|
|
|
|
2018-04-05 16:03:22 +02:00
|
|
|
# We define the runner for test-mmap after the individual
|
|
|
|
# architectures have defined their supported pages sizes. If no
|
|
|
|
# additional page sizes are defined we only run the default test.
|
|
|
|
|
|
|
|
# default case (host page size)
|
|
|
|
run-test-mmap: test-mmap
|
2018-05-21 11:38:37 +02:00
|
|
|
$(call run-test, test-mmap, $(QEMU) $<, \
|
2018-04-05 16:03:22 +02:00
|
|
|
"$< (default) on $(TARGET_NAME)")
|
|
|
|
|
|
|
|
# additional page sizes (defined by each architecture adding to EXTRA_RUNS)
|
|
|
|
run-test-mmap-%: test-mmap
|
2018-05-21 11:38:37 +02:00
|
|
|
$(call run-test, test-mmap-$*, $(QEMU) -p $* $<,\
|
2018-04-05 16:03:22 +02:00
|
|
|
"$< ($* byte pages) on $(TARGET_NAME)")
|
2019-09-16 11:24:05 +02:00
|
|
|
|
2020-04-30 21:01:21 +02:00
|
|
|
ifneq ($(HAVE_GDB_BIN),)
|
|
|
|
GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
|
|
|
|
|
|
|
|
run-gdbstub-sha1: sha1
|
|
|
|
$(call run-test, $@, $(GDB_SCRIPT) \
|
|
|
|
--gdb $(HAVE_GDB_BIN) \
|
|
|
|
--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
|
|
|
|
--bin $< --test $(MULTIARCH_SRC)/gdbstub/sha1.py, \
|
|
|
|
"basic gdbstub support")
|
|
|
|
|
2021-01-08 23:42:40 +01:00
|
|
|
EXTRA_RUNS += run-gdbstub-sha1
|
2021-01-08 23:42:42 +01:00
|
|
|
|
|
|
|
run-gdbstub-qxfer-auxv-read: sha1
|
|
|
|
$(call run-test, $@, $(GDB_SCRIPT) \
|
|
|
|
--gdb $(HAVE_GDB_BIN) \
|
|
|
|
--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
|
|
|
|
--bin $< --test $(MULTIARCH_SRC)/gdbstub/test-qxfer-auxv-read.py, \
|
|
|
|
"basic gdbstub qXfer:auxv:read support")
|
|
|
|
|
2021-02-02 14:39:54 +01:00
|
|
|
else
|
|
|
|
run-gdbstub-%:
|
|
|
|
$(call skip-test, "gdbstub test $*", "need working gdb")
|
2020-04-30 21:01:21 +02:00
|
|
|
endif
|
2021-02-02 14:39:54 +01:00
|
|
|
EXTRA_RUNS += run-gdbstub-sha1 run-gdbstub-qxfer-auxv-read
|
2020-04-30 21:01:21 +02:00
|
|
|
|
|
|
|
|
2019-09-16 11:24:05 +02:00
|
|
|
# Update TESTS
|
|
|
|
TESTS += $(MULTIARCH_TESTS)
|