]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: tests: add dbus specific tests
authorPavel Hrdina <phrdina@redhat.com>
Mon, 27 Jul 2020 09:36:02 +0000 (11:36 +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 1df25ecaf11f9aaa46b79f66b2fd946f6e64e7d3..ace1ae827c062382b2eaa35e66596de9dae8c592 100644 (file)
@@ -31,15 +31,6 @@ if WITH_LIBVIRTD
 test_programs += fdstreamtest
 endif WITH_LIBVIRTD
 
-if WITH_DBUS
-test_programs += virdbustest \
-                 virsystemdtest \
-                 $(NULL)
-if WITH_POLKIT
-test_programs += virpolkittest
-endif WITH_POLKIT
-endif WITH_DBUS
-
 if WITH_SECDRIVER_SELINUX
 if WITH_ATTR
 test_programs += securityselinuxtest \
@@ -610,23 +601,6 @@ test_programs += \
        virnetdevopenvswitchtest
 endif WITH_YAJL
 
-if WITH_DBUS
-virdbustest_SOURCES = \
-       virdbustest.c testutils.h testutils.c
-virdbustest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
-virdbustest_LDADD = $(LDADDS) $(DBUS_LIBS)
-
-virpolkittest_SOURCES = \
-       virpolkittest.c testutils.h testutils.c
-virpolkittest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
-virpolkittest_LDADD = $(LDADDS) $(DBUS_LIBS)
-
-virsystemdtest_SOURCES = \
-       virsystemdtest.c testutils.h testutils.c
-virsystemdtest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
-virsystemdtest_LDADD = $(LDADDS) $(DBUS_LIBS)
-endif WITH_DBUS
-
 if WITH_SECDRIVER_SELINUX
 if WITH_ATTR
 
index cb8c13041e61e76a08c3a1a736811310aa949125..63106fc0b65de6829914b36a3fb15e352adb1e76 100644 (file)
@@ -353,6 +353,19 @@ if conf.has('WITH_BHYVE')
   ]
 endif
 
+if conf.has('WITH_DBUS')
+  tests += [
+    { 'name': 'virdbustest', 'deps': [ dbus_dep ] },
+    { 'name': 'virsystemdtest', 'deps': [ dbus_dep ] },
+  ]
+
+  if conf.has('WITH_POLKIT')
+    tests += [
+      { 'name': 'virpolkittest', 'deps': [ dbus_dep ] },
+    ]
+  endif
+endif
+
 foreach data : tests
   test_sources = '@0@.c'.format(data['name'])
   test_bin = executable(