From 3ea0d4417666ab968aad2e853fd3e9c8b19bec15 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 5 May 2022 12:41:52 +0200 Subject: [PATCH] meson.build: use valgrind only if available --- meson.build | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/meson.build b/meson.build index 36073454..5d91bea8 100644 --- a/meson.build +++ b/meson.build @@ -329,16 +329,18 @@ if enable_tests test('test-util', test_util) test('test-iconv-helper', test_iconv_helper) - valgrind = find_program('valgrind') - valgrind_suppressions_file = join_paths(meson.source_root(), 'test', 'valgrind.suppressions') - add_test_setup('valgrind', - exe_wrapper : [ - valgrind, - '--leak-check=full', - '--quiet', - '--error-exitcode=3', - '--suppressions=' + valgrind_suppressions_file ], - timeout_multiplier: 5) + valgrind = find_program('valgrind', required : false) + if valgrind.found() + valgrind_suppressions_file = join_paths(meson.source_root(), 'test', 'valgrind.suppressions') + add_test_setup('valgrind', + exe_wrapper : [ + valgrind, + '--leak-check=full', + '--quiet', + '--error-exitcode=3', + '--suppressions=' + valgrind_suppressions_file ], + timeout_multiplier: 5) + endif endif #### ratbagd ####