if WITH_NSS
test_helpers += nsslinktest nssguestlinktest
-test_programs += nsstest nssguesttest
endif WITH_NSS
test_scripts =
endif WITH_SELINUX
if WITH_NSS
-nsstest_SOURCES = \
- nsstest.c testutils.h testutils.c
-nsstest_CFLAGS = \
- $(AM_CFLAGS) \
- -I$(top_srcdir)/tools/nss
-nsstest_LDADD = \
- $(LDADDS) \
- ../tools/nss/libnss_libvirt_impl.la
-
-nssguesttest_SOURCES = \
- nsstest.c testutils.h testutils.c
-nssguesttest_CFLAGS = \
- -DLIBVIRT_NSS_GUEST \
- $(AM_CFLAGS) \
- -I$(top_srcdir)/tools/nss
-nssguesttest_LDADD = \
- $(LDADDS) \
- ../tools/nss/libnss_libvirt_guest_impl.la
-
## Intentionaly not linking with anything else.
## See the test source for more detailed explanation.
nsslinktest_SOURCES = nsslinktest.c
]
endif
+if conf.has('WITH_NSS')
+ tests += [
+ {
+ 'name': 'nsstest',
+ 'include': [ nss_inc_dir ],
+ 'link_with': [ nss_libvirt_impl ],
+ },
+ {
+ 'name': 'nssguesttest',
+ 'sources': [ 'nsstest.c' ],
+ 'c_args': [ '-DLIBVIRT_NSS_GUEST' ],
+ 'include': [ nss_inc_dir ],
+ 'link_with': [ nss_libvirt_guest_impl ],
+ },
+ ]
+endif
+
foreach data : tests
test_sources = '@0@.c'.format(data['name'])
test_bin = executable(