tests/build: Add address sanitizer log file path

Logging into files means we don't mess up the test TAP output and
anything that requires a specific format.
This commit is contained in:
Sebastian Wick
2024-08-01 21:23:27 +02:00
committed by Patrick
parent 6519993de8
commit dad0160eee

View File

@@ -37,6 +37,8 @@ tests_environment_prepend = {
'PATH' : project_build_root / 'app',
}
lsan_options = 'log_threads=1'
if get_option('installed_tests')
configure_file(
input : 'installed-tests.sh.in',
@@ -166,6 +168,10 @@ foreach testcase : c_tests
test_env.prepend(k, v)
endforeach
lsan_log_path = ':log_path=' + meson.current_build_dir() / \
'asan_' + name.underscorify() + '.log'
test_env.set('LSAN_OPTIONS', lsan_options + lsan_log_path)
if can_run_host_binaries
test(
name,
@@ -389,6 +395,10 @@ foreach testcase : wrapped_tests
test_env.prepend(k, v)
endforeach
lsan_log_path = ':log_path=' + meson.current_build_dir() / \
'asan_' + name.underscorify() + '.log'
test_env.set('LSAN_OPTIONS', lsan_options + lsan_log_path)
if can_run_host_binaries
test(
name,