From 51c70705592c65d6dfdc2194191e5ffe933645d5 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Wed, 10 Feb 2016 18:23:10 +0100 Subject: [PATCH] Revert "tests: Don't link mock libraries against libvirt and gnulib" This reverts commit 6aa90452aa63cb1e1ffa84ff5f93f5873bf810a0. Turns out that not linking against libvirt and gnulib is okay for regular Linux (and FreeBSD) builds, but makes mingw very unhappy. .../virnetserverclientmock_la-virnetserverclientmock.o: In function `virNetSocketGetSELinuxContext': .../virnetserverclientmock.c:61: undefined reference to `rpl_strdup' .../libvirportallocatormock_la-virportallocatortest.o: In function `init_syms': .../virportallocatortest.c:61: undefined reference to `virFileClose' --- tests/Makefile.am | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/Makefile.am b/tests/Makefile.am index fb862cd7b6..c5986f0cc9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -946,6 +946,7 @@ virnetserverclientmock_la_SOURCES = \ virnetserverclientmock.c virnetserverclientmock_la_CFLAGS = $(AM_CFLAGS) virnetserverclientmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS) +virnetserverclientmock_la_LIBADD = $(GNULIB_LIBS) if WITH_GNUTLS virnettlscontexttest_SOURCES = \ @@ -1024,6 +1025,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 @@ -1049,6 +1051,8 @@ virpcitest_LDADD = $(LDADDS) virpcimock_la_SOURCES = \ virpcimock.c virpcimock_la_CFLAGS = $(AM_CFLAGS) +virpcimock_la_LIBADD = $(GNULIB_LIBS) \ + ../src/libvirt.la virpcimock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS) nodeinfomock_la_SOURCES = \ @@ -1064,6 +1068,8 @@ virnetdevtest_LDADD = $(LDADDS) virnetdevmock_la_SOURCES = \ virnetdevmock.c virnetdevmock_la_CFLAGS = $(AM_CFLAGS) $(LIBNL_CFLAGS) +virnetdevmock_la_LIBADD = $(GNULIB_LIBS) \ + ../src/libvirt.la virnetdevmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS) virrotatingfiletest_SOURCES = \