Signed-off-by: Pierrick Bouvier <[email protected]>
---
tests/tcg/riscv64/meson.build | 2 ++
tests/tcg/riscv64/system/meson.build | 38 ++++++++++++++++++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 tests/tcg/riscv64/system/meson.build
diff --git a/tests/tcg/riscv64/meson.build b/tests/tcg/riscv64/meson.build
index b5f574c1377..2292bf8ed1b 100644
--- a/tests/tcg/riscv64/meson.build
+++ b/tests/tcg/riscv64/meson.build
@@ -2,6 +2,8 @@ cc = 'riscv64-linux-gnu-gcc'
cc_dockerfile = 'debian-all-test-cross'
cc_docker_host_arch = ['aarch64', 'x86_64']
+subdir('system')
+
tests = []
# Multi arch tests
diff --git a/tests/tcg/riscv64/system/meson.build
b/tests/tcg/riscv64/system/meson.build
new file mode 100644
index 00000000000..86ad66db358
--- /dev/null
+++ b/tests/tcg/riscv64/system/meson.build
@@ -0,0 +1,38 @@
+tests = []
+
+# Multi arch tests are not supported
+# tests += tcg_tests['multiarch-softmmu']['tests']
+
+link_script = files('../semihost.ld')[0]
+cflags = ['-nostdlib',
+ '-Wa,--noexecstack',
+ '-Wl,-T', link_script]
+qemu_args = ['-M', 'virt',
+ '-display', 'none',
+ '-serial', 'stdio',
+ '-semihosting',
+ '-bios']
+
+setup = {'cflags': cflags, 'qemu_args': qemu_args}
+
+tests += {
+ 'doubletrap.S': setup + {'plugin_test': {'plugin': 'discons'}},
+ 'interruptedmemory.S': setup + {'plugin_test': {'plugin': 'discons'}},
+ 'issue1060.S': setup,
+ 'test-mepc-masking.S': setup,
+ 'test-crc32.S': setup + {'qemu_args': ['-cpu', 'rv64,xlrbr=true',
qemu_args]},
+}
+
+if 'qemu-system-riscv64' in emulators
+ tcg_tests += {
+ 'riscv64-softmmu': {
+ 'cc': cc,
+ 'cc_dockerfile': cc_dockerfile,
+ 'cc_docker_host_arch': cc_docker_host_arch,
+ 'folder': 'riscv64',
+ 'gdb_arch': 'riscv64',
+ 'qemu': emulators['qemu-system-riscv64'],
+ 'tests': tests,
+ }
+ }
+endif
--
2.47.3