From dad0160eee69466be8450bbf296ade9977d8ff00 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Thu, 1 Aug 2024 21:23:27 +0200 Subject: [PATCH] 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. --- tests/meson.build | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/meson.build b/tests/meson.build index 3a868a8a..eedd710c 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -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,