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 <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2015-09-11 11:11:45 +02:00
parent ee7758f09b
commit cce83f1318
2 changed files with 2 additions and 1 deletions

View 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

View 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();
}