[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC v3 08/32] tests: build qapi-cabi (C ABI dump)
From: |
marcandre . lureau |
Subject: |
[RFC v3 08/32] tests: build qapi-cabi (C ABI dump) |
Date: |
Tue, 7 Sep 2021 16:19:19 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
tests/qapi-cabi.c | 9 +++++++++
tests/meson.build | 13 +++++++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
create mode 100644 tests/qapi-cabi.c
diff --git a/tests/qapi-cabi.c b/tests/qapi-cabi.c
new file mode 100644
index 0000000000..2b94edb4ab
--- /dev/null
+++ b/tests/qapi-cabi.c
@@ -0,0 +1,9 @@
+#include "qemu/osdep.h"
+
+#include "test-qapi-types.h"
+
+int main(int argc, char *argv[])
+{
+ qapi_cabi();
+ return 0;
+}
diff --git a/tests/meson.build b/tests/meson.build
index 55a7b08275..be95223d62 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -54,8 +54,17 @@ foreach o: test_qapi_files.to_list() +
test_qapi_files_extra.to_list()
test_qapi_sources += o
endforeach
-libtestqapi = static_library('testqapi', sources: [genh, test_qapi_sources])
-testqapi = declare_dependency(link_with: libtestqapi, sources: [genh,
test_qapi_headers])
+libtestqapi = static_library('testqapi',
+ sources: [genh, test_qapi_sources],
+ c_args: ['-DQAPI_CABI'])
+testqapi = declare_dependency(link_with: libtestqapi,
+ dependencies: [qemuutil],
+ sources: [genh, test_qapi_headers])
+
+executable('qapi-cabi',
+ files('qapi-cabi.c'),
+ dependencies: testqapi,
+ c_args: ['-DQAPI_CABI'])
test_deps = {
'test-qht-par': qht_bench,
--
2.33.0.113.g6c40894d24
- [RFC v3 03/32] scripts/qapi: teach c_param_type() to return const argument type, (continued)
- [RFC v3 03/32] scripts/qapi: teach c_param_type() to return const argument type, marcandre . lureau, 2021/09/07
- [RFC v3 04/32] glib-compat: add G_SIZEOF_MEMBER, marcandre . lureau, 2021/09/07
- [RFC v3 05/32] scripts/qapi: add QAPISchemaVisitor.visit_module_end, marcandre . lureau, 2021/09/07
- [RFC v3 06/32] scripts/qapi: add a CABI module, marcandre . lureau, 2021/09/07
- [RFC v3 07/32] scripts/qapi: generate CABI dump for C types, marcandre . lureau, 2021/09/07
- [RFC v3 08/32] tests: build qapi-cabi (C ABI dump),
marcandre . lureau <=
- [RFC v3 09/32] build-sys: add i686 cpu target, marcandre . lureau, 2021/09/07
- [RFC v3 10/32] build-sys: add --with-rust{-target} & basic build infrastructure, marcandre . lureau, 2021/09/07
- [RFC v3 11/32] build-sys: add a cargo-wrapper script, marcandre . lureau, 2021/09/07
- [RFC v3 12/32] rust: provide a common crate for QEMU, marcandre . lureau, 2021/09/07