[PATCH 2/9] tests: Move test_libraries a bit higher

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In the Makefile in tests/ we initialize couple of variables like
test_programs, test_libraries and test_helpers. These variables
contain all the targets that we need to build in order to run
the test suite. So we initialize test_programs and test_helpers
and then conditionally add targets to them depending on what we
are building with. Then we repeat the same process with
test_libraries. It makes no sense to have two separate if-endif
sequences.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 tests/Makefile.am | 62 ++++++++++++++++++++++---------------------------------
 1 file changed, 25 insertions(+), 37 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 62c5124e6..b8de4633f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -196,6 +196,19 @@ test_programs = virshtest sockettest \
 	virtypedparamtest \
 	$(NULL)
 
+test_libraries = libshunload.la \
+	virportallocatormock.la \
+	virnetdaemonmock.la \
+	virnetserverclientmock.la \
+	vircgroupmock.la \
+	virpcimock.la \
+	virnetdevmock.la \
+	virrandommock.la \
+	virhostcpumock.la \
+	nssmock.la \
+	domaincapsmock.la \
+	$(NULL)
+
 if WITH_REMOTE
 test_programs += \
 	virnetmessagetest \
@@ -211,6 +224,10 @@ endif WITH_REMOTE
 if WITH_LINUX
 test_programs += fchosttest
 test_programs += scsihosttest
+test_libraries += virusbmock.la \
+	virnetdevbandwidthmock.la \
+	virtestmock.la \
+	$(NULL)
 endif WITH_LINUX
 
 if WITH_LIBVIRTD
@@ -221,6 +238,7 @@ if WITH_DBUS
 test_programs += virdbustest \
                  virsystemdtest \
                  $(NULL)
+test_libraries += virdbusmock.la
 if WITH_POLKIT1
 test_programs += virpolkittest
 endif WITH_POLKIT1
@@ -260,6 +278,12 @@ test_programs += qemuxml2argvtest qemuxml2xmltest \
 	qemuagenttest qemucapabilitiestest qemucaps2xmltest \
 	qemucommandutiltest
 test_helpers += qemucapsprobe
+test_libraries += libqemumonitortestutils.la \
+		libqemutestdriver.la \
+		qemuxml2argvmock.la \
+		qemucaps2xmlmock.la \
+		qemucapsprobemock.la \
+		$(NULL)
 endif WITH_QEMU
 
 if WITH_LXC
@@ -288,6 +312,7 @@ endif WITH_VMWARE
 
 if WITH_BHYVE
 test_programs += bhyvexml2argvtest bhyvexml2xmltest bhyveargv2xmltest
+test_libraries += bhyvexml2argvmock.la bhyveargv2xmlmock.la
 endif WITH_BHYVE
 
 if WITH_CIL
@@ -396,43 +421,6 @@ endif ! WITH_SECDRIVER_APPARMOR
 
 EXTRA_DIST += $(test_scripts)
 
-test_libraries = libshunload.la \
-		virportallocatormock.la \
-		virnetdaemonmock.la \
-		virnetserverclientmock.la \
-		vircgroupmock.la \
-		virpcimock.la \
-		virnetdevmock.la \
-		virrandommock.la \
-		virhostcpumock.la \
-		nssmock.la \
-		domaincapsmock.la \
-		$(NULL)
-if WITH_QEMU
-test_libraries += libqemumonitortestutils.la \
-		libqemutestdriver.la \
-		qemuxml2argvmock.la \
-		qemucaps2xmlmock.la \
-		qemucapsprobemock.la \
-		$(NULL)
-endif WITH_QEMU
-
-if WITH_BHYVE
-test_libraries += bhyvexml2argvmock.la bhyveargv2xmlmock.la
-endif WITH_BHYVE
-
-if WITH_DBUS
-test_libraries += \
-		virdbusmock.la
-endif WITH_DBUS
-
-if WITH_LINUX
-test_libraries += virusbmock.la \
-		virnetdevbandwidthmock.la \
-		virtestmock.la \
-		$(NULL)
-endif WITH_LINUX
-
 if WITH_LINUX
 check-access: file-access-clean
 	VIR_TEST_FILE_ACCESS=1 $(MAKE) $(AM_MAKEFLAGS) check
-- 
2.11.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux