]> xenbits.xensource.com Git - libvirt.git/commitdiff
build: introduce WITH_JSON
authorJán Tomko <jtomko@redhat.com>
Wed, 4 Sep 2024 14:02:16 +0000 (16:02 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 24 Sep 2024 06:24:00 +0000 (08:24 +0200)
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 <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
meson.build
tests/meson.build
tests/virnetdaemontest.c
tests/virstoragetest.c

index 4c6e5a088e3e65dcb1458d2adda7407cd245e9bd..b181d8f617567d829238c91efd797bf6b1baf9ca 100644 (file)
@@ -1414,6 +1414,7 @@ if yajl_dep.found()
   endif
 
   conf.set('WITH_YAJL', 1)
+  conf.set('WITH_JSON', 1)
 endif
 
 
index 2f1eda1f956180e6298201acc67501c50ac91440..700a5d40493071f5b2fb3ecfe6ef85914cb3de96 100644 (file)
@@ -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' },
index 74c20479d458f352aa7c57cde2d12f86e2619fbe..1a5c5f32e1f9436259db510890da74a0c35c7909 100644 (file)
@@ -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;
 };
index d07a05d04b92b5bf809f3e7d5bc08ba3daddef47..75d04e803042e41821cfc8412d03d9d94797b5e7 100644 (file)
@@ -815,7 +815,7 @@ mymain(void)
                             "  <host name='example.org' port='1234'/>\n"
                             "</source>\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)
                         "  <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>\n"
                         "</source>\n");
 
-#endif /* WITH_YAJL */
+#endif /* WITH_JSON */
 
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }