qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC v3 18/32] tests: generate Rust bindings


From: marcandre . lureau
Subject: [RFC v3 18/32] tests: generate Rust bindings
Date: Tue, 7 Sep 2021 16:19:29 +0400

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 tests/meson.build | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/tests/meson.build b/tests/meson.build
index be95223d62..7292fe20df 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -31,15 +31,29 @@ test_qapi_outputs = [
   'test-qapi-visit.h',
 ]
 
+test_qapi_inputs = files(
+  'qapi-schema/qapi-schema-test.json',
+  'qapi-schema/include/sub-module.json',
+  'qapi-schema/sub-sub-module.json'
+)
+
 test_qapi_files = custom_target('Test QAPI files',
                                 output: test_qapi_outputs,
-                                input: 
files('qapi-schema/qapi-schema-test.json',
-                                             
'qapi-schema/include/sub-module.json',
-                                             
'qapi-schema/sub-sub-module.json'),
+                                input: test_qapi_inputs,
                                 command: [ qapi_gen, '-o', 
meson.current_build_dir(),
                                            '-b', '-p', 'test-', '@INPUT0@' ],
                                 depend_files: qapi_gen_depends)
 
+if with_rust
+  test_qapi_rs_outputs = ['test-qapi-ffi-types.rs']
+  test_qapi_rs = custom_target('Test QAPI Rust binding',
+                               output: test_qapi_rs_outputs,
+                               input: test_qapi_inputs,
+                               command: [ qapi_gen, '-o', 
meson.current_build_dir(),
+                                          '-r', '-b', '-p', 'test-', 
'@INPUT0@' ],
+                               depend_files: qapi_gen_depends)
+endif
+
 # meson doesn't like generated output in other directories
 # perhaps change qapi_gen to replace / with _, like Meson itself does?
 subdir('include')
-- 
2.33.0.113.g6c40894d24




reply via email to

[Prev in Thread] Current Thread [Next in Thread]