make: split test driver build rules into test/Makefile.inc.am

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2018-02-21 18:05:56 +00:00
parent 82ef8c49ae
commit c8da8363d2
2 changed files with 27 additions and 20 deletions

View File

@ -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
@ -2107,8 +2090,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) \

26
src/test/Makefile.inc.am Normal file
View File

@ -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