From: Martin Kletzander Date: Fri, 11 Sep 2015 09:11:45 +0000 (+0200) Subject: tests: Don't use testutils in mock libraries X-Git-Tag: v1.2.20-rc1~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cce83f1318d8d62f85ffb1035fd9d0ae89012855;p=thirdparty%2Flibvirt.git tests: Don't use testutils in mock libraries 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 --- diff --git a/tests/Makefile.am b/tests/Makefile.am index bde7f5baf1..4af38fe9c1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 diff --git a/tests/virportallocatortest.c b/tests/virportallocatortest.c index 1125b0aeed..58b2155994 100644 --- a/tests/virportallocatortest.c +++ b/tests/virportallocatortest.c @@ -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(); }