From cce83f1318d8d62f85ffb1035fd9d0ae89012855 Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Fri, 11 Sep 2015 11:11:45 +0200 Subject: [PATCH] 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 --- tests/Makefile.am | 1 + tests/virportallocatortest.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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(); }