[PATCH v7 089/104] tests/tcg/tricore: system tests
Pierrick Bouvier <[email protected]>
| Newsgroups | gmane.comp.emulators.qemu |
|---|---|
| Message-ID | <[email protected]> |
Tested-by: Aniket Sahu <[email protected]> Signed-off-by: Pierrick Bouvier <[email protected]> --- tests/tcg/meson.build | 1 + tests/tcg/tricore/Makefile.softmmu-target | 53 --------------------- tests/tcg/tricore/meson.build | 57 +++++++++++++++++++++++ 3 files changed, 58 insertions(+), 53 deletions(-) delete mode 100644 tests/tcg/tricore/Makefile.softmmu-target create mode 100644 tests/tcg/tricore/meson.build diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build index 1c34b8e63c6..4903947a636 100644 --- a/tests/tcg/meson.build +++ b/tests/tcg/meson.build @@ -154,6 +154,7 @@ subdir('ppc64le') subdir('riscv64') subdir('s390x') subdir('sh4') +subdir('tricore') image_targets = {} exe_targets = [] diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target deleted file mode 100644 index 258aeb40ae8..00000000000 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ /dev/null @@ -1,53 +0,0 @@ -TESTS_PATH = $(SRC_PATH)/tests/tcg/tricore -ASM_TESTS_PATH = $(TESTS_PATH)/asm -C_TESTS_PATH = $(TESTS_PATH)/c - -LDFLAGS = -T$(TESTS_PATH)/link.ld --mcpu=tc162 -ASFLAGS = -mtc162 -CFLAGS = -mtc162 -c -I$(TESTS_PATH) - -TESTS += test_abs.asm.tst -TESTS += test_bmerge.asm.tst -TESTS += test_clz.asm.tst -TESTS += test_crcn.asm.tst -TESTS += test_dextr.asm.tst -TESTS += test_dvstep.asm.tst -TESTS += test_fadd.asm.tst -TESTS += test_fmul.asm.tst -TESTS += test_ftohp.asm.tst -TESTS += test_ftoi.asm.tst -TESTS += test_ftou.asm.tst -TESTS += test_hptof.asm.tst -TESTS += test_imask.asm.tst -TESTS += test_insert.asm.tst -TESTS += test_ld_bu.asm.tst -TESTS += test_ld_h.asm.tst -TESTS += test_madd.asm.tst -TESTS += test_msub.asm.tst -TESTS += test_muls.asm.tst - -TESTS += test_boot_to_main.c.tst -TESTS += test_context_save_areas.c.tst - -QEMU_OPTS += -M tricore_testboard -cpu tc37x -nographic -kernel - -%.pS: $(ASM_TESTS_PATH)/%.S - $(CC) -E -o $@ $< - -%.o: %.pS - $(AS) $(ASFLAGS) -o $@ $< - -%.asm.tst: %.o - $(LD) $(LDFLAGS) $< -o $@ - -crt0-tc2x.o: $(C_TESTS_PATH)/crt0-tc2x.S - $(AS) $(ASFLAGS) -o $@ $< - -%.o: $(C_TESTS_PATH)/%.c - $(CC) $(CFLAGS) -o $@ $< - -%.c.tst: %.o crt0-tc2x.o - $(LD) $(LDFLAGS) -o $@ $^ - -# We don't currently support the multiarch system tests -undefine MULTIARCH_TESTS diff --git a/tests/tcg/tricore/meson.build b/tests/tcg/tricore/meson.build new file mode 100644 index 00000000000..d0bf55dedce --- /dev/null +++ b/tests/tcg/tricore/meson.build @@ -0,0 +1,57 @@ +tests = [] + +link_script = files('link.ld')[0] +crt0 = files('c'/'crt0-tc2x.S') +asmflags = ['-Wl,--mcpu=tc162', + '-Wl,-T', link_script, + '-mtc162', + '-nostartfiles'] +cflags = [asmflags, crt0] +qemu_args = ['-display', 'none', + '-M', 'tricore_testboard', + '-cpu', 'tc37x', + '-kernel'] + +# Multi arch tests are not supported +# tests += tcg_tests['multiarch-softmmu']['tests'] + +setup_asm = {'cflags': asmflags, 'qemu_args': qemu_args} +setup_c = {'cflags': cflags, 'qemu_args': qemu_args} + +tests += { + 'asm/test_abs.S': setup_asm, + 'asm/test_bmerge.S': setup_asm, + 'asm/test_clz.S': setup_asm, + 'asm/test_crcn.S': setup_asm, + 'asm/test_dextr.S': setup_asm, + 'asm/test_dvstep.S': setup_asm, + 'asm/test_fadd.S': setup_asm, + 'asm/test_fmul.S': setup_asm, + 'asm/test_ftohp.S': setup_asm, + 'asm/test_ftoi.S': setup_asm, + 'asm/test_ftou.S': setup_asm, + 'asm/test_hptof.S': setup_asm, + 'asm/test_imask.S': setup_asm, + 'asm/test_insert.S': setup_asm, + 'asm/test_ld_bu.S': setup_asm, + 'asm/test_ld_h.S': setup_asm, + 'asm/test_madd.S': setup_asm, + 'asm/test_msub.S': setup_asm, + 'asm/test_muls.S': setup_asm, + 'c/test_boot_to_main.c': setup_c, + 'c/test_context_save_areas.c': setup_c, +} + +if 'qemu-system-tricore' in emulators + tcg_tests += { + 'tricore-softmmu': { + 'cc': 'tricore-gcc', + 'cc_dockerfile': 'debian-tricore-cross', + 'cc_docker_host_arch': ['x86_64'], + 'folder': 'tricore', + 'gdb_arch': 'tricore', + 'qemu': emulators['qemu-system-tricore'], + 'tests': tests, + } + } +endif -- 2.43.0