]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
tests: Don't use testutils in mock libraries
authorMartin Kletzander <mkletzan@redhat.com>
Fri, 11 Sep 2015 09:11:45 +0000 (11:11 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Fri, 11 Sep 2015 11:34:02 +0000 (13:34 +0200)
Mock libraries are not built with testutils.c, but there's one which
uses VIR_TEST_DEBUG.  But because that debug should be an error, if we
change it, then it will not only be more semantically correct, but mingw
compiler will be happier as well.

It also follows suit with all other mock libraries.

For few other things, used in this file, need libvirt.la to be added
into LIBADD for mingw as well.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
tests/Makefile.am
tests/virportallocatortest.c

index bde7f5baf1fe1fecf7d1528c410441ef1941feda..4af38fe9c14b69a4fdb329bbff5f637b308aad5e 100644 (file)
@@ -1020,6 +1020,7 @@ libvirportallocatormock_la_SOURCES = \
        virportallocatortest.c
 libvirportallocatormock_la_CFLAGS = $(AM_CFLAGS) -DMOCK_HELPER=1
 libvirportallocatormock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
+libvirportallocatormock_la_LIBADD = ../src/libvirt.la
 
 vircgrouptest_SOURCES = \
        vircgrouptest.c testutils.h testutils.c
index 1125b0aeeddaea1483e863ddeb86d615056a7515..58b2155994f9eaac93bd79f9c21b6e0b10f01b8a 100644 (file)
@@ -49,7 +49,7 @@ static void init_syms(void)
     realsocket = dlsym(RTLD_NEXT, "socket");
 
     if (!realsocket) {
-        VIR_TEST_DEBUG("Unable to find 'socket' symbol\n");
+        fprintf(stderr, "Unable to find 'socket' symbol\n");
         abort();
     }