mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-26 04:00:05 +01:00
meson: add a test setup for valgrind
To run valgrind properly, we need a couple of arguments passed in so we check for leaks and don't fail on bits of the stack we don't control. Add a mesontest setup for this, the lot can now be run by mesontest --setup=valgrind Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
3d68e4ede3
commit
08c622aeb2
1 changed files with 12 additions and 1 deletions
13
meson.build
13
meson.build
|
|
@ -581,7 +581,7 @@ if get_option('enable-tests')
|
|||
install : false)
|
||||
test('libinput-test-suite-runner',
|
||||
libinput_test_runner,
|
||||
timeout : 3600)
|
||||
timeout : 1200)
|
||||
|
||||
# build-test only
|
||||
executable('test-build-pedantic',
|
||||
|
|
@ -607,6 +607,17 @@ if get_option('enable-tests')
|
|||
include_directories : include_directories('src'),
|
||||
install : false)
|
||||
|
||||
valgrind_env = environment()
|
||||
valgrind_env.set('CK_FORK', 'no')
|
||||
valgrind_env.set('USING_VALGRIND', '1')
|
||||
valgrind_suppressions_file = join_paths(meson.source_root(), 'test', 'valgrind.suppressions')
|
||||
add_test_setup('valgrind',
|
||||
exe_wrapper : [ valgrind,
|
||||
'--leak-check=full',
|
||||
'--error-exitcode=3',
|
||||
'--suppressions=' + valgrind_suppressions_file ],
|
||||
env : valgrind_env,
|
||||
timeout_multiplier : 100)
|
||||
endif
|
||||
############ output files ############
|
||||
configure_file(output: 'config.h', install: false, configuration: config_h)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue