Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- tests/Makefile.am | 39 --------------------------------------- tests/meson.build | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 39 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 498655d4776..939d97a9985 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -16,14 +16,6 @@ ## License along with this library. If not, see ## <http://www.gnu.org/licenses/>. -if WITH_QEMU -test_helpers += qemucapsprobe -endif WITH_QEMU - -if WITH_NSS -test_helpers += nsslinktest nssguestlinktest -endif WITH_NSS - test_scripts = libvirtd_test_scripts = \ libvirtd-fail \ @@ -67,11 +59,6 @@ file-access-clean: > test_file_access.txt endif WITH_LINUX -if WITH_TESTS -noinst_PROGRAMS = $(test_helpers) -else ! WITH_TESTS -check_PROGRAMS = $(test_helpers) -endif ! WITH_TESTS TESTS = $(test_scripts) @@ -80,29 +67,3 @@ VALGRIND = valgrind --quiet --leak-check=full --trace-children=yes \ --suppressions=$(abs_srcdir)/.valgrind.supp valgrind: $(MAKE) check VG="$(LIBTOOL) --mode=execute $(VALGRIND)" - -if WITH_QEMU -qemucapsprobe_SOURCES = \ - qemucapsprobe.c -qemucapsprobe_LDADD = \ - libqemutestdriver.la $(LDADDS) -endif ! WITH_QEMU - -if WITH_NSS -## Intentionaly not linking with anything else. -## See the test source for more detailed explanation. -nsslinktest_SOURCES = nsslinktest.c -nsslinktest_CFLAGS = \ - $(AM_CFLAGS) \ - -I$(top_srcdir)/tools/nss -nsslinktest_LDADD = ../tools/nss/libnss_libvirt_impl.la -nsslinktest_LDFLAGS = $(NULL) - -nssguestlinktest_SOURCES = nsslinktest.c -nssguestlinktest_CFLAGS = \ - -DLIBVIRT_NSS_GUEST \ - $(AM_CFLAGS) \ - -I$(top_srcdir)/tools/nss -nssguestlinktest_LDADD = ../tools/nss/libnss_libvirt_guest_impl.la -nssguestlinktest_LDFLAGS = $(NULL) -endif ! WITH_NSS diff --git a/tests/meson.build b/tests/meson.build index ebf53891ec7..5df9973ccf9 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -578,6 +578,34 @@ endforeach helpers = [] +if conf.has('WITH_NSS') + helpers += [ + # Intentionaly not linking with anything else. + # See the test source for more detailed explanation. + { + 'name': 'nsslinktest', + 'include': [ nss_inc_dir ], + 'link_with': [ nss_libvirt_impl ], + }, + { + 'name': 'nssguestlinktest', + 'sources': [ 'nsslinktest.c' ], + 'c_args': [ '-DLIBVIRT_NSS_GUEST' ], + 'include': [ nss_inc_dir ], + 'link_with': [ nss_libvirt_guest_impl ], + }, + ] +endif + +if conf.has('WITH_QEMU') + helpers += [ + { + 'name': 'qemucapsprobe', + 'link_with': [ test_qemu_driver_lib, libvirt_lib ], + }, + ] +endif + foreach data : helpers helper_sources = '@0@.c'.format(data['name']) helper_bin = executable( -- 2.26.2