]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: tests: add bhyve specific tests
authorPavel Hrdina <phrdina@redhat.com>
Mon, 27 Jul 2020 09:34:24 +0000 (11:34 +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 d1ddb333133ed0bc283c8b8617b07aad727d8012..1df25ecaf11f9aaa46b79f66b2fd946f6e64e7d3 100644 (file)
@@ -95,10 +95,6 @@ if WITH_VMWARE
 test_programs += vmwarevertest
 endif WITH_VMWARE
 
-if WITH_BHYVE
-test_programs += bhyvexml2argvtest bhyvexml2xmltest bhyveargv2xmltest
-endif WITH_BHYVE
-
 if WITH_YAJL
 test_programs += virjsontest
 endif WITH_YAJL
@@ -421,27 +417,6 @@ vmwarevertest_SOURCES = \
 vmwarevertest_LDADD = $(LDADDS)
 endif WITH_VMWARE
 
-if WITH_BHYVE
-bhyve_LDADDS = \
-       ../src/libvirt_driver_bhyve_impl.la \
-       $(LDADDS) \
-       $(NULL)
-bhyvexml2argvtest_SOURCES = \
-       bhyvexml2argvtest.c \
-       testutils.c testutils.h
-bhyvexml2argvtest_LDADD = $(bhyve_LDADDS)
-
-bhyvexml2xmltest_SOURCES = \
-       bhyvexml2xmltest.c \
-       testutils.c testutils.h
-bhyvexml2xmltest_LDADD = $(bhyve_LDADDS)
-
-bhyveargv2xmltest_SOURCES = \
-       bhyveargv2xmltest.c \
-       testutils.c testutils.h
-bhyveargv2xmltest_LDADD = $(bhyve_LDADDS)
-endif WITH_BHYVE
-
 if WITH_NETWORK
 networkxml2xmltest_SOURCES = \
        networkxml2xmltest.c \
index 572893d32b4aaf1901ece55379d85e92314cdbab..cb8c13041e61e76a08c3a1a736811310aa949125 100644 (file)
@@ -345,6 +345,14 @@ if host_machine.system() == 'linux'
   ]
 endif
 
+if conf.has('WITH_BHYVE')
+  tests += [
+    { 'name': 'bhyveargv2xmltest', 'link_with': [ bhyve_driver_impl ] },
+    { 'name': 'bhyvexml2argvtest', 'link_with': [ bhyve_driver_impl ] },
+    { 'name': 'bhyvexml2xmltest', 'link_with': [ bhyve_driver_impl ] },
+  ]
+endif
+
 foreach data : tests
   test_sources = '@0@.c'.format(data['name'])
   test_bin = executable(