summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2021-07-14 15:57:17 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2021-07-28 13:19:02 +0300
commit00922ec8a17be42c444b0667cc53004dc177d4df (patch)
tree46f760cc4dee631acf1d93b40faf1542372da3e3
parent394d126fb2698102d0e09f10e665c3c69d723a44 (diff)
tests: add a meson test setup to run tests under valgrind
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
-rw-r--r--tests/meson.build12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/meson.build b/tests/meson.build
index a5ee7bb..62fefda 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -4,6 +4,18 @@ common_env = environment({
'ICIPC_DEBUG': '3',
})
+valgrind = find_program('valgrind', required: false)
+if valgrind.found()
+ add_test_setup('valgrind',
+ exe_wrapper: [ valgrind,
+ '--leak-check=full',
+ '--gen-suppressions=all',
+ '--error-exitcode=3',
+ '--keep-debuginfo=yes',
+ ],
+ timeout_multiplier: 2)
+endif
+
test(
'test-icipc-sender-receiver',
executable('test-sender-receiver', 'sender-receiver.c', dependencies: common_deps),