build: avoid test failure when sasl was not compiled in

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.
This commit is contained in:
Eric Blake 2012-09-05 15:02:01 -06:00
parent ae94cf2d13
commit 5d3b65f96b

View File

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