From 40317f079efbe8d735fa4d1e09c6b4fbe91012d3 Mon Sep 17 00:00:00 2001 From: Eric Haszlakiewicz Date: Sat, 15 Jul 2017 07:03:18 -0700 Subject: [PATCH] Allow USE_VALGRIND to be set to anything starting with 0, N or n to disable valgrind during tests. --- tests/test-defs.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test-defs.sh b/tests/test-defs.sh index 5a32d39..7e1739b 100755 --- a/tests/test-defs.sh +++ b/tests/test-defs.sh @@ -50,6 +50,14 @@ echo "=== Running test $progname" CMP="${CMP-cmp}" use_valgrind=${USE_VALGRIND-1} +case "${use_valgrind}" in + [0Nn]*) + use_valgrind=0 + ;; + *) + use_valgrind=1 + ;; +esac valgrind_path=$(which valgrind 2> /dev/null) if [ -z "${valgrind_path}" -o ! -x "${valgrind_path}" ] ; then use_valgrind=0