[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 08/21] tests/tcg/xtensa: enable system tests
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PATCH v4 08/21] tests/tcg/xtensa: enable system tests |
Date: |
Tue, 12 Mar 2019 15:59:34 +0000 |
Signed-off-by: Alex Bennée <address@hidden>
---
v2
- use cross CC for linker
- fix up test selection to skip linker.ld.S
---
tests/tcg/xtensa/Makefile | 102 -----------------------
tests/tcg/xtensa/Makefile.softmmu-target | 42 ++++++++++
2 files changed, 42 insertions(+), 102 deletions(-)
delete mode 100644 tests/tcg/xtensa/Makefile
create mode 100644 tests/tcg/xtensa/Makefile.softmmu-target
diff --git a/tests/tcg/xtensa/Makefile b/tests/tcg/xtensa/Makefile
deleted file mode 100644
index 2bd4491769..0000000000
--- a/tests/tcg/xtensa/Makefile
+++ /dev/null
@@ -1,102 +0,0 @@
--include ../../../config-host.mak
-
-CORE=dc232b
-CROSS=xtensa-$(CORE)-elf-
-
-ifndef XT
-SIM = ../../../xtensa-softmmu/qemu-system-xtensa
-SIMFLAGS = -M sim -cpu $(CORE) -nographic -semihosting -icount 6 $(EXTFLAGS)
-kernel
-SIMDEBUG = -s -S
-else
-SIM = xt-run
-SIMFLAGS = --xtensa-core=DC_B_232L --exit_with_target_code $(EXTFLAGS)
-SIMDEBUG = --gdbserve=0
-endif
-
-HOST_CC = gcc
-CC = $(CROSS)gcc
-AS = $(CROSS)gcc -x assembler-with-cpp
-LD = $(CROSS)ld
-
-ASFLAGS = -Wa,--no-absolute-literals
-vectors_ASFLAGS = -mtext-section-literals
-
-XTENSA_SRC_PATH = $(SRC_PATH)/tests/tcg/xtensa
-INCLUDE_DIRS = $(XTENSA_SRC_PATH) $(SRC_PATH)/target/xtensa/core-$(CORE)
-XTENSA_INC = $(addprefix -I,$(INCLUDE_DIRS))
-
-LDFLAGS = -Tlinker.ld
-
-CRT = crt.o vectors.o
-
-TESTCASES += test_b.tst
-TESTCASES += test_bi.tst
-TESTCASES += test_boolean.tst
-TESTCASES += test_break.tst
-TESTCASES += test_bz.tst
-TESTCASES += test_cache.tst
-TESTCASES += test_clamps.tst
-TESTCASES += test_extui.tst
-TESTCASES += test_fail.tst
-TESTCASES += test_flix.tst
-TESTCASES += test_fp0_arith.tst
-TESTCASES += test_fp0_conv.tst
-TESTCASES += test_fp1.tst
-TESTCASES += test_fp_cpenable.tst
-TESTCASES += test_interrupt.tst
-TESTCASES += test_loop.tst
-TESTCASES += test_lsc.tst
-TESTCASES += test_mac16.tst
-TESTCASES += test_max.tst
-TESTCASES += test_min.tst
-TESTCASES += test_mmu.tst
-TESTCASES += test_mul16.tst
-TESTCASES += test_mul32.tst
-TESTCASES += test_nsa.tst
-TESTCASES += test_phys_mem.tst
-ifdef XT
-TESTCASES += test_pipeline.tst
-endif
-TESTCASES += test_quo.tst
-TESTCASES += test_rem.tst
-TESTCASES += test_rst0.tst
-TESTCASES += test_s32c1i.tst
-TESTCASES += test_sar.tst
-TESTCASES += test_sext.tst
-TESTCASES += test_shift.tst
-TESTCASES += test_sr.tst
-TESTCASES += test_timer.tst
-TESTCASES += test_windowed.tst
-
-all: build
-
-linker.ld: $(XTENSA_SRC_PATH)/linker.ld.S
- $(HOST_CC) $(XTENSA_INC) -E -P $< -o $@
-
-%.o: $(XTENSA_SRC_PATH)/%.c
- $(CC) $(XTENSA_INC) $(CFLAGS) -c $< -o $@
-
-%.o: $(XTENSA_SRC_PATH)/%.S
- $(CC) $(XTENSA_INC) $($*_ASFLAGS) $(ASFLAGS) -c $< -o $@
-
-%.tst: %.o linker.ld $(XTENSA_SRC_PATH)/macros.inc $(CRT) Makefile
- $(LD) $(LDFLAGS) $(NOSTDFLAGS) $(CRT) $< -o $@
-
-build: $(TESTCASES)
-
-check: $(addprefix run-, $(TESTCASES))
-
-run-%.tst: %.tst
- $(SIM) $(SIMFLAGS) ./$<
-
-run-test_fail.tst: test_fail.tst
- ! $(SIM) $(SIMFLAGS) ./$<
-
-debug-%.tst: %.tst
- $(SIM) $(SIMDEBUG) $(SIMFLAGS) ./$<
-
-host-debug-%.tst: %.tst
- gdb --args $(SIM) $(SIMFLAGS) ./$<
-
-clean:
- $(RM) -fr $(TESTCASES) $(CRT) linker.ld
diff --git a/tests/tcg/xtensa/Makefile.softmmu-target
b/tests/tcg/xtensa/Makefile.softmmu-target
new file mode 100644
index 0000000000..86bb47db77
--- /dev/null
+++ b/tests/tcg/xtensa/Makefile.softmmu-target
@@ -0,0 +1,42 @@
+#
+# Xtensa softmmu tests
+#
+
+ifneq ($(TARGET_WORDS_BIGENDIAN),y)
+
+XTENSA_SRC = $(SRC_PATH)/tests/tcg/xtensa
+XTENSA_ALL = $(filter-out $(XTENSA_SRC)/linker.ld.S,$(wildcard
$(XTENSA_SRC)/*.S))
+XTENSA_TESTS = $(patsubst $(XTENSA_SRC)/%.S, %, $(XTENSA_ALL))
+# Filter out common blobs and broken tests
+XTENSA_BROKEN_TESTS = crt vectors test_boolean test_pipeline test_fail
+XTENSA_USABLE_TESTS = $(filter-out $(XTENSA_BROKEN_TESTS), $(XTENSA_TESTS))
+
+# add to the list of tests
+TESTS += $(XTENSA_USABLE_TESTS)
+VPATH += $(XTENSA_SRC)
+
+CORE=dc232b
+QEMU_OPTS+=-M sim -cpu $(CORE) -nographic -semihosting -icount 6 $(EXTFLAGS)
-kernel
+
+INCLUDE_DIRS = $(SRC_PATH)/target/xtensa/core-$(CORE)
+XTENSA_INC = $(addprefix -I,$(INCLUDE_DIRS))
+
+vectors_ASFLAGS = -mtext-section-literals
+ASFLAGS = -Wa,--no-absolute-literals
+LDFLAGS = -Tlinker.ld -nostartfiles -nostdlib
+
+CRT = crt.o vectors.o
+
+linker.ld: linker.ld.S
+ $(CC) $(XTENSA_INC) -E -P $< -o $@
+
+$(XTENSA_USABLE_TESTS): linker.ld macros.inc $(CRT) Makefile.softmmu-target
+
+# special rule for common blobs
+%.o: %.S
+ $(CC) $(XTENSA_INC) $($*_ASFLAGS) $(ASFLAGS) -c $< -o $@
+
+%: %.S
+ $(CC) $(XTENSA_INC) $(ASFLAGS) $< -o $@ $(LDFLAGS) $(NOSTDFLAGS) $(CRT)
+
+endif
--
2.20.1
- [Qemu-devel] [PATCH v4 00/21] final tcg tests for 4.0, Alex Bennée, 2019/03/12
- [Qemu-devel] [PATCH v4 10/21] tests/docker: add fedora-cris-cross compilers, Alex Bennée, 2019/03/12
- [Qemu-devel] [PATCH v4 08/21] tests/tcg/xtensa: enable system tests,
Alex Bennée <=
- [Qemu-devel] [PATCH v4 09/21] tests/tcg/arm: add ARMv6-M UNDEFINED 32-bit instruction test, Alex Bennée, 2019/03/12
- [Qemu-devel] [PATCH v4 02/21] tests/tcg: enable tcg tests for softmmu, Alex Bennée, 2019/03/12
- [Qemu-devel] [PATCH v4 07/21] tests/docker: add debian-xtensa-cross image, Alex Bennée, 2019/03/12
- [Qemu-devel] [PATCH v4 11/21] tests/tcg/cris: cleanup sys.c, Alex Bennée, 2019/03/12
- [Qemu-devel] [PATCH v4 06/21] tests/tcg/mips: fix hello-mips compilation, Alex Bennée, 2019/03/12
- [Qemu-devel] [PATCH v4 03/21] tests/tcg: add QEMU_OPT option for test runner, Alex Bennée, 2019/03/12
- [Qemu-devel] [PATCH v4 01/21] tests/tcg: add softmmu awareness to Makefile, Alex Bennée, 2019/03/12
- [Qemu-devel] [PATCH v4 12/21] tests/tcg: split cris tests into bare and libc directories, Alex Bennée, 2019/03/12
- [Qemu-devel] [PATCH v4 13/21] tests/tcg/cris: comment out the ccs test, Alex Bennée, 2019/03/12
- [Qemu-devel] [PATCH v4 04/21] tests/tcg: split run-test into user and system variants, Alex Bennée, 2019/03/12