diff options
-rw-r--r-- | tests/init.cfg | 6 | ||||
-rwxr-xr-x | tests/misc/sort-stale-thread-mem | 2 |
2 files changed, 7 insertions, 1 deletions
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 . \ diff --git a/tests/misc/sort-stale-thread-mem b/tests/misc/sort-stale-thread-mem index c19f62ee3..05cc9ba1c 100755 --- a/tests/misc/sort-stale-thread-mem +++ b/tests/misc/sort-stale-thread-mem @@ -22,8 +22,8 @@ print_ver_ sort very_expensive_ +require_valgrind_ -valgrind --help >/dev/null || skip_ "requires valgrind" grep '^#define HAVE_PTHREAD_T 1' "$CONFIG_HEADER" > /dev/null || skip_ 'requires pthreads' |