1
0
forked from drath/libratbag

meson.build: use valgrind only if available

This commit is contained in:
Andreas Schwab
2022-05-05 12:41:52 +02:00
committed by Filipe Laíns
parent 3e1bc79aac
commit 3ea0d44176

View File

@@ -329,16 +329,18 @@ if enable_tests
test('test-util', test_util)
test('test-iconv-helper', test_iconv_helper)
valgrind = find_program('valgrind')
valgrind_suppressions_file = join_paths(meson.source_root(), 'test', 'valgrind.suppressions')
add_test_setup('valgrind',
exe_wrapper : [
valgrind,
'--leak-check=full',
'--quiet',
'--error-exitcode=3',
'--suppressions=' + valgrind_suppressions_file ],
timeout_multiplier: 5)
valgrind = find_program('valgrind', required : false)
if valgrind.found()
valgrind_suppressions_file = join_paths(meson.source_root(), 'test', 'valgrind.suppressions')
add_test_setup('valgrind',
exe_wrapper : [
valgrind,
'--leak-check=full',
'--quiet',
'--error-exitcode=3',
'--suppressions=' + valgrind_suppressions_file ],
timeout_multiplier: 5)
endif
endif
#### ratbagd ####