meson_build_sh = find_program('tools/meson-build.sh')
want_tests = get_option('tests')
-slow_tests = want_tests != 'false' and get_option('slow-tests')
-fuzz_tests = want_tests != 'false' and get_option('fuzz-tests')
-integration_tests = want_tests != 'false' and get_option('integration-tests')
+want_slow_tests = want_tests != 'false' and get_option('slow-tests')
+want_fuzz_tests = want_tests != 'false' and get_option('fuzz-tests')
+want_integration_tests = want_tests != 'false' and get_option('integration-tests')
install_tests = want_tests != 'false' and get_option('install-tests')
if add_languages('cpp', native : false, required : fuzzer_build)
conf.set10('ENABLE_SSH_PROXY_CONFIG', sshconfdir != 'no')
conf.set10('ENABLE_SSH_USERDB_CONFIG', conf.get('ENABLE_USERDB') == 1 and sshdconfdir != 'no')
-conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', slow_tests)
+conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', want_slow_tests)
#####################################################################
#####################################################################
mkosi = find_program('mkosi', required : false)
-if integration_tests and not mkosi.found()
+if want_integration_tests and not mkosi.found()
error('Could not find mkosi which is required to run the integration tests')
endif
message('Not compiling @0@ because tests is set to false'.format(name))
continue
endif
- if not fuzz_tests
+ if not want_fuzz_tests
message('Not compiling @0@ because fuzz-tests is set to false'.format(name))
continue
endif
['debug mmap cache'],
['debug siphash'],
['trace logging', conf.get('LOG_TRACE') == 1],
- ['slow tests', slow_tests],
- ['fuzz tests', fuzz_tests],
+ ['slow tests', want_slow_tests],
+ ['fuzz tests', want_fuzz_tests],
['install tests', install_tests],
['link-udev-shared', get_option('link-udev-shared')],
['link-systemctl-shared', get_option('link-systemctl-shared')],
test_env.set('SYSTEMD_LANGUAGE_FALLBACK_MAP', language_fallback_map)
test_env.set('PATH', project_build_root + ':' + path)
test_env.set('PROJECT_BUILD_ROOT', project_build_root)
-test_env.set('SYSTEMD_SLOW_TESTS', slow_tests ? '1' : '0')
-test_env.set('SYSTEMD_INTEGRATION_TESTS', integration_tests ? '1' : '0')
+test_env.set('SYSTEMD_SLOW_TESTS', want_slow_tests ? '1' : '0')
if efi_addon != ''
test_env.set('EFI_ADDON', efi_addon)
'--',
] + test_params['mkosi_args']
+ integration_test_env = {}
+
+ if want_integration_tests
+ integration_test_env = {'SYSTEMD_INTEGRATION_TESTS': '1'}
+ endif
+
# We don't explicitly depend on the "mkosi" target because that means the image is rebuilt
# on every "ninja -C build". Instead, the mkosi target has to be rebuilt manually before
# running the integration tests with mkosi.
test(dirname,
integration_test_wrapper,
- env : test_env,
+ env : integration_test_env,
args : args,
timeout : test_params['timeout'],
suite : 'integration-tests')