From dcb7cfd149c7e66bdbfac262ad3008a9a879d9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Wed, 4 Sep 2024 16:02:16 +0200 Subject: [PATCH] build: introduce WITH_JSON MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some tests depend on WITH_YAJL even though the actual library used does not make a difference. Introduce WITH_JSON for a smoother transition. Signed-off-by: Ján Tomko Reviewed-by: Peter Krempa --- meson.build | 1 + tests/meson.build | 6 +++--- tests/virnetdaemontest.c | 2 +- tests/virstoragetest.c | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 4c6e5a088e..b181d8f617 100644 --- a/meson.build +++ b/meson.build @@ -1414,6 +1414,7 @@ if yajl_dep.found() endif conf.set('WITH_YAJL', 1) + conf.set('WITH_JSON', 1) endif diff --git a/tests/meson.build b/tests/meson.build index 2f1eda1f95..700a5d4049 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -329,7 +329,7 @@ if host_machine.system() == 'linux' { 'name': 'virscsitest' }, { 'name': 'virusbtest' }, ] - if conf.has('WITH_YAJL') + if conf.has('WITH_JSON') tests += [ { 'name': 'virnetdevopenvswitchtest' }, ] @@ -406,7 +406,7 @@ if conf.has('WITH_NETWORK') ] endif -if conf.has('WITH_NODE_DEVICES') and conf.has('WITH_YAJL') +if conf.has('WITH_NODE_DEVICES') and conf.has('WITH_JSON') tests += [ { 'name': 'nodedevmdevctltest', 'link_with': [ node_device_driver_impl ] }, ] @@ -555,7 +555,7 @@ if conf.has('WITH_VMX') ] endif -if conf.has('WITH_YAJL') +if conf.has('WITH_JSON') tests += [ { 'name': 'virjsontest' }, { 'name': 'virmacmaptest' }, diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c index 74c20479d4..1a5c5f32e1 100644 --- a/tests/virnetdaemontest.c +++ b/tests/virnetdaemontest.c @@ -26,7 +26,7 @@ #define VIR_FROM_THIS VIR_FROM_RPC -#if !defined(WIN32) && defined(WITH_YAJL) +#if !defined(WIN32) && defined(WITH_JSON) struct testClientPriv { int magic; }; diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index d07a05d04b..75d04e8030 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -815,7 +815,7 @@ mymain(void) " \n" "\n", 1); -#ifdef WITH_YAJL +#ifdef WITH_JSON TEST_BACKING_PARSE("json:", NULL); TEST_BACKING_PARSE("json:asdgsdfg", NULL); TEST_BACKING_PARSE("json:{}", NULL); @@ -1192,7 +1192,7 @@ mymain(void) "
\n" "\n"); -#endif /* WITH_YAJL */ +#endif /* WITH_JSON */ return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; }