mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 16:10:06 +01:00
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>
This commit is contained in:
parent
a4b9813b92
commit
b8123db0df
2 changed files with 22 additions and 16 deletions
|
|
@ -42,9 +42,9 @@ variables:
|
||||||
# See the documentation here: #
|
# See the documentation here: #
|
||||||
# https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html #
|
# https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
FEDORA_RPMS: 'git gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark valgrind libwacom-devel cairo-devel gtk3-devel glib2-devel mtdev-devel'
|
FEDORA_RPMS: 'git gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark libwacom-devel cairo-devel gtk3-devel glib2-devel mtdev-devel'
|
||||||
UBUNTU_DEBS: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme valgrind libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev'
|
UBUNTU_DEBS: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev'
|
||||||
ARCH_PKGS: 'git gcc pkgconfig meson check libsystemd libevdev doxygen graphviz python-sphinx python-recommonmark valgrind libwacom gtk3 mtdev diffutils'
|
ARCH_PKGS: 'git gcc pkgconfig meson check libsystemd libevdev doxygen graphviz python-sphinx python-recommonmark libwacom gtk3 mtdev diffutils'
|
||||||
FREEBSD_BUILD_PKGS: 'meson'
|
FREEBSD_BUILD_PKGS: 'meson'
|
||||||
FREEBSD_PKGS: 'libepoll-shim libudev-devd libevdev libwacom gtk3 libmtdev '
|
FREEBSD_PKGS: 'libepoll-shim libudev-devd libevdev libwacom gtk3 libmtdev '
|
||||||
############################ end of package lists #############################
|
############################ end of package lists #############################
|
||||||
|
|
@ -598,6 +598,8 @@ fedora:29@valgrind:
|
||||||
extends: .fedora-build@template
|
extends: .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
FEDORA_VERSION: 29
|
FEDORA_VERSION: 29
|
||||||
|
before_script:
|
||||||
|
- dnf install -y valgrind
|
||||||
# note: we override the default_build here by providing a new script
|
# note: we override the default_build here by providing a new script
|
||||||
script:
|
script:
|
||||||
- rm -rf "$MESON_BUILDDIR"
|
- rm -rf "$MESON_BUILDDIR"
|
||||||
|
|
|
||||||
30
meson.build
30
meson.build
|
|
@ -665,7 +665,6 @@ endif
|
||||||
# dependencies
|
# dependencies
|
||||||
if get_option('tests')
|
if get_option('tests')
|
||||||
dep_check = dependency('check', version : '>= 0.9.10')
|
dep_check = dependency('check', version : '>= 0.9.10')
|
||||||
valgrind = find_program('valgrind')
|
|
||||||
|
|
||||||
leftover_rules = find_program('test/check-leftover-udev-rules.sh')
|
leftover_rules = find_program('test/check-leftover-udev-rules.sh')
|
||||||
test('leftover-rules', leftover_rules, is_parallel : false)
|
test('leftover-rules', leftover_rules, is_parallel : false)
|
||||||
|
|
@ -865,18 +864,23 @@ if get_option('tests')
|
||||||
libinput_test_runner,
|
libinput_test_runner,
|
||||||
args: ['--filter-deviceless'])
|
args: ['--filter-deviceless'])
|
||||||
|
|
||||||
valgrind_env = environment()
|
valgrind = find_program('valgrind', required : false)
|
||||||
valgrind_env.set('CK_FORK', 'no')
|
if valgrind.found()
|
||||||
valgrind_env.set('USING_VALGRIND', '1')
|
valgrind_env = environment()
|
||||||
valgrind_suppressions_file = join_paths(dir_src_test, 'valgrind.suppressions')
|
valgrind_env.set('CK_FORK', 'no')
|
||||||
add_test_setup('valgrind',
|
valgrind_env.set('USING_VALGRIND', '1')
|
||||||
exe_wrapper : [ valgrind,
|
valgrind_suppressions_file = join_paths(dir_src_test, 'valgrind.suppressions')
|
||||||
'--leak-check=full',
|
add_test_setup('valgrind',
|
||||||
'--gen-suppressions=all',
|
exe_wrapper : [ valgrind,
|
||||||
'--error-exitcode=3',
|
'--leak-check=full',
|
||||||
'--suppressions=' + valgrind_suppressions_file ],
|
'--gen-suppressions=all',
|
||||||
env : valgrind_env,
|
'--error-exitcode=3',
|
||||||
timeout_multiplier : 100)
|
'--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',
|
configure_file(output : 'litest-config.h',
|
||||||
install : false,
|
install : false,
|
||||||
configuration : litest_config_h)
|
configuration : litest_config_h)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue