]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
build: avoid test failure when sasl was not compiled in
authorEric Blake <eblake@redhat.com>
Wed, 5 Sep 2012 21:02:01 +0000 (15:02 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 5 Sep 2012 21:02:01 +0000 (15:02 -0600)
On systems without cyrus-sasl-devel available (I happened to be
in that situation on my FreeBSD testing), this test fails rather
miserably:

TEST: libvirtdconftest
      .....!!!!!!...!!!!!!!!!!!!!!!!!!!!!!!!!  39  FAIL
FAIL: libvirtdconftest

with verbose output showing things like:

39) Test corruption                                          ... libvir: Config File error : unsupporeted configuration: remoteReadConfigFile: /usr/home/dummy/libvirt/tests/../daemon/libvirtd.conf: auth_tcp: unsupported auth sasl

* tests/libvirtdconftest.c (testCorrupt): Avoid failure when sasl
is missing.

tests/libvirtdconftest.c

index b394d54a45c4ae694b541be583c101ae27306051..a6e1f35a1884d7f6dfe6ecc2cd9caed0d0535d66 100644 (file)
@@ -120,6 +120,13 @@ testCorrupt(const void *opaque)
         goto cleanup;
     }
 
+#if !HAVE_SASL
+    if (strstr(err->message, "unsupported auth sasl")) {
+        VIR_DEBUG("sasl unsupported, skipping this config");
+        goto cleanup;
+    }
+#endif
+
     switch (type) {
     case VIR_CONF_LONG:
         if (!strstr(err->message, "invalid type: got string; expected long")) {