Signed-off-by: Pierrick Bouvier <[email protected]>
---
tests/tcg/meson.build | 1 +
tests/tcg/riscv64/meson.build | 36 +++++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+)
create mode 100644 tests/tcg/riscv64/meson.build
diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build
index ad8b40661e8..bb4b770070f 100644
--- a/tests/tcg/meson.build
+++ b/tests/tcg/meson.build
@@ -148,6 +148,7 @@ subdir('mips64el')
subdir('or1k')
subdir('ppc64')
subdir('ppc64le')
+subdir('riscv64')
image_targets = {}
exe_targets = []
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.47.3