AC_DEFUN([LIBVIRT_CHECK_JANSSON],[
dnl Jansson http://www.digip.org/jansson/
LIBVIRT_CHECK_PKG([JANSSON], [jansson], [2.5])
+ dnl Older versions of Jansson did not preserve the order of object keys
+ dnl use this check to guard the tests that are sensitive to this
+ LIBVIRT_CHECK_PKG([STABLE_ORDERING_JANSSON], [jansson], [2.8], [true])
])
AC_DEFUN([LIBVIRT_RESULT_JANSSON],[
char *capslatest_x86_64 = NULL;
virQEMUCapsPtr caps_x86_64 = NULL;
+#if !WITH_STABLE_ORDERING_JANSSON
+ fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
+ return EXIT_AM_SKIP;
+#endif
+
if (qemuTestDriverInit(&driver) < 0)
return EXIT_FAILURE;
int ret = 0;
testQemuData data;
+#if !WITH_STABLE_ORDERING_JANSSON
+ fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
+ return EXIT_AM_SKIP;
+#endif
+
#if !WITH_JANSSON
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
return EXIT_AM_SKIP;
int ret = 0;
testQemuCommandBuildObjectFromJSONData data1;
+#if !WITH_STABLE_ORDERING_JANSSON
+ fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
+ return EXIT_AM_SKIP;
+#endif
+
#if !WITH_JANSSON
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
return EXIT_AM_SKIP;
struct qemuHotplugTestData data = {0};
struct testQemuHotplugCpuParams cpudata;
+#if !WITH_STABLE_ORDERING_JANSSON
+ fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
+ return EXIT_AM_SKIP;
+#endif
+
#if !WITH_JANSSON
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
return EXIT_AM_SKIP;
virQEMUDriver driver;
int ret = 0;
+#if !WITH_STABLE_ORDERING_JANSSON
+ fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
+ return EXIT_AM_SKIP;
+#endif
+
#if !WITH_JANSSON
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
return EXIT_AM_SKIP;
virJSONValuePtr metaschema = NULL;
char *metaschemastr = NULL;
+#if !WITH_STABLE_ORDERING_JANSSON
+ fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
+ return EXIT_AM_SKIP;
+#endif
+
#if !WITH_JANSSON
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
return EXIT_AM_SKIP;
{
int ret = 0;
+#if !WITH_STABLE_ORDERING_JANSSON
+ fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
+ return EXIT_AM_SKIP;
+#endif
+
#define DO_TEST_FULL(name, cmd, doc, expect, pass) \
do { \
struct testInfo info = { doc, expect, pass }; \
int ret = 0;
virMacMapPtr mgr = NULL;
+#if !WITH_STABLE_ORDERING_JANSSON
+ fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
+ return EXIT_AM_SKIP;
+#endif
+
#define DO_TEST_BASIC(f, d, ...) \
do { \
const char * const m[] = {__VA_ARGS__, NULL }; \
int ret = 0;
const char *server_names[] = { "testServer0", "testServer1" };
+# if !WITH_STABLE_ORDERING_JANSSON
+ fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
+ return EXIT_AM_SKIP;
+# endif
+
if (virInitialize() < 0 ||
virEventRegisterDefaultImpl() < 0) {
virDispatchError(NULL);