tests = []
fuzzers = []
+catalogs = []
############################################################
test('dlopen-nss_' + module,
test_dlopen,
# path to dlopen must include a slash
- args : nss.full_path())
+ args : nss.full_path(),
+ depends : nss)
endif
endif
endforeach
test('test-fstab-generator',
test_fstab_generator_sh,
# https://github.com/mesonbuild/meson/issues/2681
- args : exe.full_path())
+ args : exe.full_path(),
+ depends : exe)
endif
if conf.get('ENABLE_ENVIRONMENT_D') == 1
test('dlopen-pam_systemd',
test_dlopen,
# path to dlopen must include a slash
- args : pam_systemd.full_path())
+ args : pam_systemd.full_path(),
+ depends : pam_systemd)
endif
endif
endif
if conf.get('HAVE_SYSV_COMPAT') == 1
- executable(
+ exe = executable(
'systemd-sysv-generator',
'src/sysv-generator/sysv-generator.c',
include_directories : includes,
install : true,
install_dir : systemgeneratordir)
+ sysv_generator_test_py = find_program('test/sysv-generator-test.py')
+ if want_tests != 'false'
+ test('sysv-generator-test',
+ sysv_generator_test_py,
+ depends : exe)
+ endif
+
executable(
'systemd-rc-local-generator',
'src/rc-local-generator/rc-local-generator.c',
test('test-network-generator-conversion',
test_network_generator_conversion_sh,
# https://github.com/mesonbuild/meson/issues/2681
- args : exe.full_path())
+ args : exe.full_path(),
+ depends : exe)
endif
executable(
############################################################
-custom_target(
+runtest_env = custom_target(
'systemd-runtest.env',
output : 'systemd-runtest.env',
command : [sh, '-c',
'{ echo SYSTEMD_TEST_DATA=@0@; echo SYSTEMD_CATALOG_DIR=@1@; } >@OUTPUT@'.format(
project_source_root / 'test',
project_build_root / 'catalog')],
+ depends : catalogs,
build_by_default : true)
test_cflags = ['-DTEST_CODE=1']
build_by_default : want_tests != 'false',
install_rpath : rootlibexecdir,
install : install_tests,
- install_dir : testsdir / type)
+ install_dir : testsdir / type,
+ link_depends : runtest_env)
if type == 'manual'
message('@0@ is a manual test'.format(name))
if want_tests != 'false'
test('check-help-' + name,
check_help,
- args : exec.full_path())
+ args : exec.full_path(),
+ depends: exec)
endif
endforeach
############################################################
-if conf.get('HAVE_SYSV_COMPAT') == 1
- sysv_generator_test_py = find_program('sysv-generator-test.py')
- if want_tests != 'false'
- test('sysv-generator-test',
- sysv_generator_test_py)
- endif
-endif
-
-############################################################
-
if install_tests
install_data('run-unit-tests.py',
install_mode : 'rwxr-xr-x',
test(name,
udev_dmi_memory_id_test,
- args : [udev_prog_paths['dmi_memory_id'],
+ args : [udev_prog_paths['dmi_memory_id'].full_path(),
source,
- source + '.txt'])
+ source + '.txt'],
+ depends : udev_prog_paths['dmi_memory_id'])
endforeach
endif