[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
- Re: [RFC v3 13/32] rust: use vendored-sources, (continued)
[RFC v3 14/32] scripts/qapi: add QAPISchemaIfCond.rsgen(), marcandre . lureau, 2021/09/07
[RFC v3 15/32] scripts/qapi: strip trailing whitespaces, marcandre . lureau, 2021/09/07
[RFC v3 16/32] scripts/qapi: add Rust FFI bindings generation, marcandre . lureau, 2021/09/07
[RFC v3 17/32] scripts/qapi: learn to generate ABI dump for Rust FFI, marcandre . lureau, 2021/09/07
[RFC v3 18/32] tests: generate Rust bindings,
marcandre . lureau <=
[RFC v3 19/32] tests: check Rust and C CABI diffs, marcandre . lureau, 2021/09/07
[RFC v3 20/32] scripts/qapi: generate high-level Rust bindings, marcandre . lureau, 2021/09/07
[RFC v3 22/32] qga: build qapi-cabi binary (ABI from C), marcandre . lureau, 2021/09/07
[RFC v3 21/32] tests/rust: build a common library, checking bindings compile, marcandre . lureau, 2021/09/07
[RFC v3 23/32] qga/rust: build and link an empty static library, marcandre . lureau, 2021/09/07
[RFC v3 24/32] qga/rust: generate QGA QAPI types FFI bindings, marcandre . lureau, 2021/09/07
[RFC v3 25/32] qga/rust: build a qga-cabi-rs executable (ABI from Rust), marcandre . lureau, 2021/09/07
[RFC v3 26/32] qga/rust: check the Rust C binding, marcandre . lureau, 2021/09/07
[RFC v3 27/32] qga/rust: build high-level Rust QAPI types, marcandre . lureau, 2021/09/07
[RFC v3 28/32] qga/rust: implement get-host-name in Rust (example), marcandre . lureau, 2021/09/07