qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

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