test_programs += storagebackendsheepdogtest
endif WITH_STORAGE_SHEEPDOG
-if WITH_NWFILTER
-test_programs += nwfilterebiptablestest
-test_programs += nwfilterxml2firewalltest
-endif WITH_NWFILTER
-
if WITH_STORAGE
test_programs += storagevolxml2argvtest
test_programs += storagepoolxml2argvtest
$(LDADDS)
endif WITH_STORAGE_SHEEPDOG
-if WITH_NWFILTER
-nwfilterebiptablestest_SOURCES = \
- nwfilterebiptablestest.c \
- testutils.c testutils.h
-nwfilterebiptablestest_LDADD = ../src/libvirt_driver_nwfilter_impl.la $(LDADDS)
-
-nwfilterxml2firewalltest_SOURCES = \
- nwfilterxml2firewalltest.c \
- testutils.c testutils.h
-nwfilterxml2firewalltest_LDADD = \
- ../src/libvirt_driver_nwfilter_impl.la $(LDADDS)
-endif WITH_NWFILTER
-
if WITH_STORAGE
virstorageutiltest_SOURCES = \
virstorageutiltest.c \
]
endif
+if conf.has('WITH_NWFILTER')
+ tests += [
+ { 'name': 'nwfilterebiptablestest', 'link_with': [ nwfilter_driver_impl ] },
+ { 'name': 'nwfilterxml2firewalltest', 'link_with': [ nwfilter_driver_impl ] },
+ ]
+endif
+
foreach data : tests
test_sources = '@0@.c'.format(data['name'])
test_bin = executable(