diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2019-03-15 10:23:25 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2019-03-15 04:10:39 +0000 |
commit | b8123db0df7f1d358bcd2a1cc984095f4091fe61 (patch) | |
tree | 43be5cdbdeb6fe36e9babc4f4afad50c37a9cac3 /meson.build | |
parent | a4b9813b920ccc79e55202ac6a295451b7e1844b (diff) | |
download | libinput-b8123db0df7f1d358bcd2a1cc984095f4091fe61.tar.gz |
meson.build: make valgrind optional
Now that we're providing the test suite as installed option, distributions
will likely include it as a test package. valgrind is only used for the
meson-specifc test setup. So let's make it optional.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/meson.build b/meson.build index 6e1e5590..cb3218b2 100644 --- a/meson.build +++ b/meson.build @@ -665,7 +665,6 @@ endif # dependencies if get_option('tests') dep_check = dependency('check', version : '>= 0.9.10') - valgrind = find_program('valgrind') leftover_rules = find_program('test/check-leftover-udev-rules.sh') test('leftover-rules', leftover_rules, is_parallel : false) @@ -865,18 +864,23 @@ if get_option('tests') libinput_test_runner, args: ['--filter-deviceless']) - valgrind_env = environment() - valgrind_env.set('CK_FORK', 'no') - valgrind_env.set('USING_VALGRIND', '1') - valgrind_suppressions_file = join_paths(dir_src_test, 'valgrind.suppressions') - add_test_setup('valgrind', - exe_wrapper : [ valgrind, - '--leak-check=full', - '--gen-suppressions=all', - '--error-exitcode=3', - '--suppressions=' + valgrind_suppressions_file ], - env : valgrind_env, - timeout_multiplier : 100) + valgrind = find_program('valgrind', required : false) + if valgrind.found() + valgrind_env = environment() + valgrind_env.set('CK_FORK', 'no') + valgrind_env.set('USING_VALGRIND', '1') + valgrind_suppressions_file = join_paths(dir_src_test, 'valgrind.suppressions') + add_test_setup('valgrind', + exe_wrapper : [ valgrind, + '--leak-check=full', + '--gen-suppressions=all', + '--error-exitcode=3', + '--suppressions=' + valgrind_suppressions_file ], + env : valgrind_env, + timeout_multiplier : 100) + else + message('valgrind not found, disabling valgrind test suite') + endif configure_file(output : 'litest-config.h', install : false, configuration : litest_config_h) |