]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: tests: add linux specific tests
authorPavel Hrdina <phrdina@redhat.com>
Mon, 27 Jul 2020 09:34:03 +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 0cca4308ffaf4d2ac1cc8f1c4e359a42ff7a41c2..d1ddb333133ed0bc283c8b8617b07aad727d8012 100644 (file)
@@ -27,13 +27,6 @@ test_programs += \
        $(NULL)
 endif WITH_REMOTE
 
-if WITH_LINUX
-test_programs += fchosttest
-test_programs += scsihosttest
-test_programs += vircaps2xmltest
-test_programs += virresctrltest
-endif WITH_LINUX
-
 if WITH_LIBVIRTD
 test_programs += fdstreamtest
 endif WITH_LIBVIRTD
@@ -139,10 +132,6 @@ if WITH_STORAGE_FS
 test_programs += virstoragetest
 endif WITH_STORAGE_FS
 
-if WITH_LINUX
-test_programs += virscsitest
-endif WITH_LINUX
-
 if WITH_NSS
 test_helpers += nsslinktest nssguestlinktest
 test_programs += nsstest nssguesttest
@@ -152,12 +141,6 @@ if WITH_NODE_DEVICES
 test_programs += nodedevmdevctltest
 endif WITH_NODE_DEVICES
 
-if WITH_LINUX
-test_programs += virusbtest \
-       virnetdevbandwidthtest \
-       $(NULL)
-endif WITH_LINUX
-
 test_scripts =
 libvirtd_test_scripts = \
        libvirtd-fail \
@@ -600,16 +583,6 @@ viridentitytest_DEPENDENCIES = libsecurityselinuxhelper.la \
        ../src/libvirt.la
 endif WITH_SELINUX
 
-if WITH_LINUX
-vircaps2xmltest_SOURCES = \
-       vircaps2xmltest.c testutils.h testutils.c virfilewrapper.h virfilewrapper.c
-vircaps2xmltest_LDADD = $(LDADDS)
-
-virresctrltest_SOURCES = \
-       virresctrltest.c testutils.h testutils.c virfilewrapper.h virfilewrapper.c
-virresctrltest_LDADD = $(LDADDS)
-endif WITH_LINUX
-
 if WITH_NSS
 nsstest_SOURCES = \
        nsstest.c testutils.h testutils.c
@@ -662,16 +635,6 @@ test_programs += \
        virnetdevopenvswitchtest
 endif WITH_YAJL
 
-if WITH_LINUX
-virusbtest_SOURCES = \
-       virusbtest.c testutils.h testutils.c
-virusbtest_LDADD = $(LDADDS)
-
-virnetdevbandwidthtest_SOURCES = \
-       virnetdevbandwidthtest.c testutils.h testutils.c
-virnetdevbandwidthtest_LDADD = $(LDADDS) $(LIBXML_LIBS)
-endif WITH_LINUX
-
 if WITH_DBUS
 virdbustest_SOURCES = \
        virdbustest.c testutils.h testutils.c
@@ -732,19 +695,3 @@ endif WITH_LIBVIRTD
 fdstreamtest_SOURCES = \
        fdstreamtest.c testutils.h testutils.c
 fdstreamtest_LDADD = $(LDADDS)
-
-if WITH_LINUX
-fchosttest_SOURCES = \
-       fchosttest.c testutils.h testutils.c
-fchosttest_LDADD = $(LDADDS)
-
-scsihosttest_SOURCES = \
-       scsihosttest.c testutils.h testutils.c
-scsihosttest_LDADD = $(LDADDS)
-endif WITH_LINUX
-
-if WITH_LINUX
-virscsitest_SOURCES = \
-       virscsitest.c testutils.h testutils.c
-virscsitest_LDADD = $(LDADDS)
-endif WITH_LINUX
index c547d81d714f02981365eadf2353bd77a746b05c..572893d32b4aaf1901ece55379d85e92314cdbab 100644 (file)
@@ -333,6 +333,18 @@ tests += [
   { 'name': 'vshtabletest', 'link_with': [ libvirt_shell_lib ] },
 ]
 
+if host_machine.system() == 'linux'
+  tests += [
+    { 'name': 'fchosttest' },
+    { 'name': 'scsihosttest' },
+    { 'name': 'vircaps2xmltest', 'link_whole': [ test_file_wrapper_lib ] },
+    { 'name': 'virnetdevbandwidthtest' },
+    { 'name': 'virresctrltest', 'link_whole': [ test_file_wrapper_lib ] },
+    { 'name': 'virscsitest' },
+    { 'name': 'virusbtest' },
+  ]
+endif
+
 foreach data : tests
   test_sources = '@0@.c'.format(data['name'])
   test_bin = executable(