From 41fa1a4f6319959cf790fe1013f10241441d6758 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Mon, 27 Jul 2020 11:36:02 +0200 Subject: [PATCH] meson: tests: add dbus specific tests Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa Reviewed-by: Neal Gompa --- tests/Makefile.am | 26 -------------------------- tests/meson.build | 13 +++++++++++++ 2 files changed, 13 insertions(+), 26 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 1df25ecaf1..ace1ae827c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 diff --git a/tests/meson.build b/tests/meson.build index cb8c13041e..63106fc0b6 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -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(