diff --git a/tests/Makefile.am b/tests/Makefile.am index 75201e1ebe..e691919c99 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -16,14 +16,6 @@ ## License along with this library. If not, see ## . -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,8 +59,6 @@ file-access-clean: > test_file_access.txt endif WITH_LINUX -noinst_PROGRAMS = $(test_helpers) - TESTS = $(test_scripts) VALGRIND = valgrind --quiet --leak-check=full --trace-children=yes \ @@ -76,29 +66,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 d1f35d9a48..cd59730d21 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -591,6 +591,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(