]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: tests: add network specific tests
authorPavel Hrdina <phrdina@redhat.com>
Mon, 27 Jul 2020 09:37:34 +0000 (11:37 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:27:05 +0000 (09:27 +0200)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
tests/Makefile.am
tests/meson.build

index 00d5f6a9e9484e7cd55e09c68b7a41ca7fb475e0..8e66a946745e0762df6e5ee3f409a4d933327f6d 100644 (file)
@@ -73,14 +73,6 @@ if WITH_YAJL
 test_programs += virjsontest
 endif WITH_YAJL
 
-if WITH_NETWORK
-test_programs += \
-               networkxml2xmltest \
-               networkxml2conftest \
-               networkxml2firewalltest \
-               $(NULL)
-endif WITH_NETWORK
-
 if WITH_STORAGE_SHEEPDOG
 test_programs += storagebackendsheepdogtest
 endif WITH_STORAGE_SHEEPDOG
@@ -333,23 +325,6 @@ vmwarevertest_SOURCES = \
 vmwarevertest_LDADD = $(LDADDS)
 endif WITH_VMWARE
 
-if WITH_NETWORK
-networkxml2xmltest_SOURCES = \
-       networkxml2xmltest.c \
-       testutils.c testutils.h
-networkxml2xmltest_LDADD = ../src/libvirt_driver_network_impl.la $(LDADDS)
-
-networkxml2conftest_SOURCES = \
-       networkxml2conftest.c \
-       testutils.c testutils.h
-networkxml2conftest_LDADD = ../src/libvirt_driver_network_impl.la $(LDADDS)
-
-networkxml2firewalltest_SOURCES = \
-       networkxml2firewalltest.c \
-       testutils.c testutils.h
-networkxml2firewalltest_LDADD = ../src/libvirt_driver_network_impl.la $(LDADDS)
-endif WITH_NETWORK
-
 if WITH_STORAGE_SHEEPDOG
 storagebackendsheepdogtest_SOURCES = \
        storagebackendsheepdogtest.c \
index 19e014801e905fc986d0eef0b75381d0020b1264..46bf2b86761b6ac2b477416a7512449b6be1bcdf 100644 (file)
@@ -396,6 +396,14 @@ if conf.has('WITH_LXC')
   ]
 endif
 
+if conf.has('WITH_NETWORK')
+  tests += [
+    { 'name': 'networkxml2conftest', 'link_with': [ network_driver_impl ] },
+    { 'name': 'networkxml2firewalltest', 'link_with': [ network_driver_impl ] },
+    { 'name': 'networkxml2xmltest', 'link_with': [ network_driver_impl ] },
+  ]
+endif
+
 foreach data : tests
   test_sources = '@0@.c'.format(data['name'])
   test_bin = executable(