meson.build: add the valgrind test setup, exclude python tests
This way we can invoke the expected setup with meson test --setup=valgrind And because we don't care about valgrinding python script, mark that test as part of the "python-tests" suite and skip it during our CI valgrind run. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Ran Benita <ran@unusedvar.com>master
parent
f0b1441f5e
commit
c3d42390f7
|
@ -34,7 +34,7 @@ jobs:
|
||||||
meson compile -C build
|
meson compile -C build
|
||||||
- name: Test
|
- name: Test
|
||||||
run:
|
run:
|
||||||
meson test -C build --print-errorlogs --wrapper="valgrind --leak-check=full --track-origins=yes --error-exitcode=99"
|
meson test -C build --print-errorlogs --setup=valgrind --no-suite python-tests
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
runs-on: macos-10.15
|
runs-on: macos-10.15
|
||||||
|
|
15
meson.build
15
meson.build
|
@ -480,6 +480,7 @@ test(
|
||||||
'symbols-leak-test',
|
'symbols-leak-test',
|
||||||
find_program('test/symbols-leak-test.py'),
|
find_program('test/symbols-leak-test.py'),
|
||||||
env: test_env,
|
env: test_env,
|
||||||
|
suite: ['python-tests'],
|
||||||
)
|
)
|
||||||
if get_option('enable-x11')
|
if get_option('enable-x11')
|
||||||
test(
|
test(
|
||||||
|
@ -501,6 +502,20 @@ if get_option('enable-xkbregistry')
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
valgrind = find_program('valgrind', required: false)
|
||||||
|
if valgrind.found()
|
||||||
|
add_test_setup('valgrind',
|
||||||
|
exe_wrapper: [valgrind,
|
||||||
|
'--leak-check=full',
|
||||||
|
'--track-origins=yes',
|
||||||
|
'--gen-suppressions=all',
|
||||||
|
'--error-exitcode=99'],
|
||||||
|
timeout_multiplier : 10)
|
||||||
|
else
|
||||||
|
message('valgrind not found, disabling valgrind test setup')
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# Fuzzing target programs.
|
# Fuzzing target programs.
|
||||||
executable('fuzz-keymap', 'fuzz/keymap/target.c', dependencies: test_dep)
|
executable('fuzz-keymap', 'fuzz/keymap/target.c', dependencies: test_dep)
|
||||||
executable('fuzz-compose', 'fuzz/compose/target.c', dependencies: test_dep)
|
executable('fuzz-compose', 'fuzz/compose/target.c', dependencies: test_dep)
|
||||||
|
|
Loading…
Reference in New Issue