mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
tests: Add setup mode to run tests using valgrind
In such case we need to ignore the python errors, so including a suppression file when using --setup=valgrind.
This commit is contained in:
@@ -54,3 +54,19 @@ if gdb.found()
|
||||
gdb.path())
|
||||
])
|
||||
endif
|
||||
|
||||
valgrind = find_program('valgrind', required: false)
|
||||
if valgrind.found()
|
||||
glib_share = glib_dep.get_pkgconfig_variable('prefix') / 'share' / glib_dep.name()
|
||||
glib_suppressions = glib_share + '/valgrind/glib.supp'
|
||||
python_suppressions = '@0@/@1@'.format(meson.source_root(),
|
||||
files('valgrind-python.supp')[0])
|
||||
add_test_setup('valgrind',
|
||||
timeout_multiplier: 10,
|
||||
env: [
|
||||
'G_SLICE=always-malloc',
|
||||
('LIBFPRINT_TEST_WRAPPER=@0@ --tool=memcheck --leak-check=full ' +
|
||||
'--suppressions=@1@ --suppressions=@2@').format(
|
||||
valgrind.path(), glib_suppressions, python_suppressions)
|
||||
])
|
||||
endif
|
||||
|
||||
55
tests/valgrind-python.supp
Normal file
55
tests/valgrind-python.supp
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
ignore_py_cond
|
||||
Memcheck:Cond
|
||||
...
|
||||
fun:Py*
|
||||
}
|
||||
|
||||
{
|
||||
ignore__py_cond
|
||||
Memcheck:Cond
|
||||
...
|
||||
fun:_Py*
|
||||
}
|
||||
|
||||
{
|
||||
ignore_py_value8
|
||||
Memcheck:Value8
|
||||
...
|
||||
fun:Py*
|
||||
}
|
||||
|
||||
{
|
||||
ignore__py_value8
|
||||
Memcheck:Value8
|
||||
...
|
||||
fun:_Py*
|
||||
}
|
||||
|
||||
{
|
||||
ignore_py_addr4
|
||||
Memcheck:Addr4
|
||||
...
|
||||
fun:Py*
|
||||
}
|
||||
|
||||
{
|
||||
ignore__py_addr4
|
||||
Memcheck:Addr4
|
||||
...
|
||||
fun:_Py*
|
||||
}
|
||||
|
||||
{
|
||||
ignore_py_leaks
|
||||
Memcheck:Leak
|
||||
...
|
||||
fun:Py*
|
||||
}
|
||||
|
||||
{
|
||||
ignore__py_leaks
|
||||
Memcheck:Leak
|
||||
...
|
||||
fun:_Py*
|
||||
}
|
||||
Reference in New Issue
Block a user