From b8104e47ca23cb7ba57e0c06451df093e6b02593 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 18 Aug 2012 07:25:28 +0200 Subject: tests: wrap the valgrind-requiring assertion in a function * tests/init.cfg (require_valgrind_): New function... * tests/misc/sort-stale-thread-mem: ...extracted from here. --- tests/init.cfg | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/init.cfg') diff --git a/tests/init.cfg b/tests/init.cfg index 4ff5ad4d5..f223f13a5 100644 --- a/tests/init.cfg +++ b/tests/init.cfg @@ -160,6 +160,12 @@ require_strace_() fi } +# Skip the current test if valgrind doesn't work. +require_valgrind_() +{ + valgrind --help >/dev/null || skip_ "requires valgrind" +} + require_setfacl_() { setfacl -m user::rwx . \ -- cgit v1.2.3-70-g09d2