[PATCH v7 080/104] tests/tcg/riscv64: user tests
Pierrick Bouvier <[email protected]>
| Newsgroups | gmane.comp.emulators.qemu |
|---|---|
| Message-ID | <[email protected]> |
Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Tested-by: Aniket Sahu <[email protected]> Signed-off-by: Pierrick Bouvier <[email protected]> --- tests/tcg/meson.build | 1 + tests/tcg/riscv64/Makefile.target | 20 ----------------- tests/tcg/riscv64/meson.build | 36 +++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 20 deletions(-) delete mode 100644 tests/tcg/riscv64/Makefile.target create mode 100644 tests/tcg/riscv64/meson.build diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build index f13f0d84792..1a48b37f75c 100644 --- a/tests/tcg/meson.build +++ b/tests/tcg/meson.build @@ -151,6 +151,7 @@ subdir('mips64el') subdir('or1k') subdir('ppc64') subdir('ppc64le') +subdir('riscv64') image_targets = {} exe_targets = [] diff --git a/tests/tcg/riscv64/Makefile.target b/tests/tcg/riscv64/Makefile.target deleted file mode 100644 index 4da5b9a3b32..00000000000 --- a/tests/tcg/riscv64/Makefile.target +++ /dev/null @@ -1,20 +0,0 @@ -# -*- Mode: makefile -*- -# RISC-V specific tweaks - -VPATH += $(SRC_PATH)/tests/tcg/riscv64 -TESTS += test-div -TESTS += noexec - -# Disable compressed instructions for test-noc -TESTS += test-noc -test-noc: LDFLAGS = -nostdlib -static -run-test-noc: QEMU_OPTS += -cpu rv64,c=false - -TESTS += test-aes -run-test-aes: QEMU_OPTS += -cpu rv64,zk=on - -# Test for fcvtmod -TESTS += test-fcvtmod -test-fcvtmod: CFLAGS += -march=rv64imafdc -test-fcvtmod: LDFLAGS += -static -run-test-fcvtmod: QEMU_OPTS += -cpu rv64,d=true,zfa=true diff --git a/tests/tcg/riscv64/meson.build b/tests/tcg/riscv64/meson.build new file mode 100644 index 00000000000..b5f574c1377 --- /dev/null +++ b/tests/tcg/riscv64/meson.build @@ -0,0 +1,36 @@ +cc = 'riscv64-linux-gnu-gcc' +cc_dockerfile = 'debian-all-test-cross' +cc_docker_host_arch = ['aarch64', 'x86_64'] + +tests = [] + +# Multi arch tests +tests += tcg_tests['multiarch-linux-user']['tests'] + +tests += { + 'noexec.c': {}, + 'test-aes.c': {'qemu_args': ['-cpu', 'rv64,zk=on']}, + 'test-div.c': {}, + 'test-fcvtmod.c': { + 'cflags': ['-march=rv64imafdc'], + 'qemu_args': ['-cpu', 'rv64,d=true,zfa=true'], + }, + 'test-noc.S': { + 'cflags': ['-nostdlib'], + 'qemu_args': ['-cpu', 'rv64,c=false'], + }, +} + +if 'qemu-riscv64' in emulators + tcg_tests += { + 'riscv64-linux-user': { + 'cc': cc, + 'cc_dockerfile': cc_dockerfile, + 'cc_docker_host_arch': cc_docker_host_arch, + 'folder': 'riscv64', + 'gdb_arch': 'riscv64', + 'qemu': emulators['qemu-riscv64'], + 'tests': tests, + } + } +endif -- 2.43.0