test: hook up a valgrind test run in meson

Use with:
	meson test -C builddir --setup=valgrind
This commit is contained in:
Peter Hutterer 2021-06-03 14:13:38 +10:00
parent 7909c99ead
commit 53215a66b9

View file

@ -59,3 +59,16 @@ test('test spa',
include_directories: pwtest_inc,
link_with: pwtest_lib)
)
valgrind = find_program('valgrind', required: false)
if valgrind.found()
valgrind_env = environment()
add_test_setup('valgrind',
exe_wrapper : [ valgrind,
'--leak-check=full',
'--gen-suppressions=all',
'--error-exitcode=3',
],
env : valgrind_env,
timeout_multiplier : 100)
endif