]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: Move test_libraries a bit higher
authorMichal Privoznik <mprivozn@redhat.com>
Sun, 25 Dec 2016 15:00:15 +0000 (16:00 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 2 Jan 2017 12:25:42 +0000 (13:25 +0100)
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@redhat.com>
tests/Makefile.am

index 62c5124e6a7861e5c9346d09838c3426ef65553c..b8de4633fe014cefccf15ccca8da6f533e96a332 100644 (file)
@@ -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