]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: don't test json when not compiled in
authorEric Blake <eblake@redhat.com>
Fri, 22 Feb 2013 22:28:53 +0000 (15:28 -0700)
committerEric Blake <eblake@redhat.com>
Tue, 26 Feb 2013 00:38:05 +0000 (17:38 -0700)
Now that the segfault is solved, we can skip instead of fail
the test when yajl is not present.

* tests/qemumonitorjsontest.c (mymain): Skip if no yajl.

tests/qemumonitorjsontest.c

index 55032d6d7af77b36cad2cfa74dcbb446b9aec1bc..107653e2de88a4210f27a5732540d2a812e83af7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2012 Red Hat, Inc.
+ * Copyright (C) 2011-2013 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -444,6 +444,11 @@ mymain(void)
     int ret = 0;
     virCapsPtr caps;
 
+#if !WITH_YAJL
+    fprintf(stderr, "libvirt not compiled with yajl, skipping");
+    return EXIT_AM_SKIP;
+#endif
+
     if (virThreadInitialize() < 0)
         exit(EXIT_FAILURE);