Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/Makefile.am | 21 +--------------------
src/test/Makefile.inc.am | 26 ++++++++++++++++++++++++++
2 files changed, 27 insertions(+), 20 deletions(-)
create mode 100644 src/test/Makefile.inc.am
diff --git a/src/Makefile.am b/src/Makefile.am
index 15549ec5b8..bec7930c2b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -72,6 +72,7 @@ libvirt_la_BUILT_LIBADD =
include uml/Makefile.inc.am
include phyp/Makefile.inc.am
+include test/Makefile.inc.am
install-data-extra: $(INSTALL_DATA_DIRS:%=install-data-%)
uninstall-data-extra: $(INSTALL_DATA_DIRS:%=install-data-%)
@@ -776,7 +777,6 @@ DRIVER_SOURCE_FILES += \
$(REMOTE_DRIVER_SOURCES) \
$(SECRET_DRIVER_SOURCES) \
$(STORAGE_DRIVER_SOURCES) \
- $(TEST_DRIVER_SOURCES) \
$(VBOX_DRIVER_SOURCES) \
vbox/vbox_tmpl.c \
$(VMWARE_DRIVER_SOURCES) \
@@ -824,11 +824,6 @@ check-local: check-protocol check-symfile check-symsorting \
check-aclperms check-admin-symfile check-admin-symsorting
.PHONY: check-protocol $(PROTOCOL_STRUCTS:structs=struct)
-# Mock driver, covering domains, storage, networks, etc
-TEST_DRIVER_SOURCES = \
- test/test_driver.c test/test_driver.h
-TEST_DRIVER_ASSETS = test/test-screenshot.png
-
# Now the Hypervisor specific drivers
XEN_DRIVER_SOURCES = \
xen/block_stats.c xen/block_stats.h \
@@ -1338,18 +1333,6 @@ GENERATED_SYM_FILES = \
libvirt_admin.syms libvirt_admin.def \
$(NULL)
-if WITH_TEST
-
-driver_test_asset_DATA = $(TEST_DRIVER_ASSETS)
-driver_test_assetdir = $(pkgdatadir)
-
-noinst_LTLIBRARIES += libvirt_driver_test.la
-libvirt_la_BUILT_LIBADD += libvirt_driver_test.la
-libvirt_driver_test_la_CFLAGS = \
- -I$(srcdir)/conf $(AM_CFLAGS)
-libvirt_driver_test_la_SOURCES = $(TEST_DRIVER_SOURCES)
-endif WITH_TEST
-
if WITH_REMOTE
noinst_LTLIBRARIES += libvirt_driver_remote.la
libvirt_la_BUILT_LIBADD += libvirt_driver_remote.la
@@ -2106,8 +2089,6 @@ access/viraccessapichecklxc.c: $(srcdir)/rpc/gendispatch.pl \
# Add all conditional sources just in case...
EXTRA_DIST += \
- $(TEST_DRIVER_SOURCES) \
- $(TEST_DRIVER_ASSETS) \
$(REMOTE_DRIVER_SOURCES) \
$(XEN_DRIVER_SOURCES) \
$(QEMU_DRIVER_SOURCES) \
diff --git a/src/test/Makefile.inc.am b/src/test/Makefile.inc.am
new file mode 100644
index 0000000000..d52c281545
--- /dev/null
+++ b/src/test/Makefile.inc.am
@@ -0,0 +1,26 @@
+TEST_DRIVER_SOURCES = \
+ test/test_driver.c \
+ test/test_driver.h \
+ $(NULL)
+TEST_DRIVER_ASSETS = test/test-screenshot.png
+
+DRIVER_SOURCE_FILES += $(TEST_DRIVER_SOURCES)
+
+EXTRA_DIST += \
+ $(TEST_DRIVER_SOURCES) \
+ $(TEST_DRIVER_ASSETS) \
+ $(NULL)
+
+if WITH_TEST
+
+driver_test_asset_DATA = $(TEST_DRIVER_ASSETS)
+driver_test_assetdir = $(pkgdatadir)
+
+noinst_LTLIBRARIES += libvirt_driver_test.la
+libvirt_la_BUILT_LIBADD += libvirt_driver_test.la
+libvirt_driver_test_la_CFLAGS = \
+ -I$(srcdir)/conf \
+ $(AM_CFLAGS) \
+ $(NULL)
+libvirt_driver_test_la_SOURCES = $(TEST_DRIVER_SOURCES)
+endif WITH_TEST
--
2.14.3