diff mbox series

[2/4] tests: Create a shared library with libxl driver

Message ID d9837dd58517436600ccbc829870d171f748e55b.1549665763.git.crobinso@redhat.com
State Accepted
Commit deb3b59b74c8c8e9571ddab4d0b4fc4784ded18a
Headers show
Series libxl: override HAVE_PVUSB in test suite | expand

Commit Message

Cole Robinson Feb. 8, 2019, 10:47 p.m. UTC
This allows us to mock functions in the libxl driver, like
is already possible for the qemu driver

Signed-off-by: Cole Robinson <crobinso@redhat.com>

---
 tests/Makefile.am | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
diff mbox series

Patch

diff --git a/tests/Makefile.am b/tests/Makefile.am
index c9f79a4e7d..c3f633cee0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -58,7 +58,7 @@  MOCKLIBS_LDFLAGS = -module -avoid-version \
 	-rpath /evil/libtool/hack/to/force/shared/lib/creation \
 	$(MINGW_EXTRA_LDFLAGS)
 
-QEMULIB_LDFLAGS = \
+DRIVERLIB_LDFLAGS = \
 	-avoid-version \
 	-rpath /evil/libtool/hack/to/force/shared/lib/creation \
 	$(MINGW_EXTRA_LDFLAGS)
@@ -278,7 +278,7 @@  ssh_LDADD = $(COVERAGE_LDFLAGS)
 if WITH_LIBXL
 test_programs += xlconfigtest xml2sexprtest sexpr2xmltest \
 	xmconfigtest libxlxml2domconfigtest
-test_libraries += libxlmock.la
+test_libraries += libxltestdriver.la libxlmock.la
 endif WITH_LIBXL
 
 if WITH_QEMU
@@ -509,6 +509,10 @@  libxl_LDADDS += ../src/libvirt_driver_network_impl.la
 endif WITH_NETWORK
 libxl_LDADDS += $(LDADDS)
 
+libxltestdriver_la_SOURCES =
+libxltestdriver_la_LDFLAGS = $(DRIVERLIB_LDFLAGS)
+libxltestdriver_la_LIBADD = $(libxl_LDADDS)
+
 xlconfigtest_SOURCES = \
 	xlconfigtest.c testutilsxen.c testutilsxen.h \
 	testutils.c testutils.h
@@ -567,7 +571,7 @@  qemu_LDADDS += ../src/libvirt_qemu_probes.lo
 endif WITH_DTRACE_PROBES
 
 libqemutestdriver_la_SOURCES =
-libqemutestdriver_la_LDFLAGS = $(QEMULIB_LDFLAGS)
+libqemutestdriver_la_LDFLAGS = $(DRIVERLIB_LDFLAGS)
 libqemutestdriver_la_LIBADD = $(qemu_LDADDS)
 
 qemucpumock_la_SOURCES = \
@@ -1038,7 +1042,7 @@  endif WITH_QEMU
 
 if WITH_LIBXL
 domaincapstest_SOURCES += testutilsxen.c testutilsxen.h
-domaincapstest_LDADD += ../src/libvirt_driver_libxl_impl.la $(GNULIB_LIBS)
+domaincapstest_LDADD += libxltestdriver.la $(GNULIB_LIBS)
 endif WITH_LIBXL
 
 if WITH_BHYVE