From: Eric Haszlakiewicz Date: Sat, 15 Jul 2017 14:03:18 +0000 (-0700) Subject: Allow USE_VALGRIND to be set to anything starting with 0, N or n to disable valgrind... X-Git-Tag: json-c-0.13-20171207~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=40317f079efbe8d735fa4d1e09c6b4fbe91012d3;p=thirdparty%2Fjson-c.git Allow USE_VALGRIND to be set to anything starting with 0, N or n to disable valgrind during tests. --- diff --git a/tests/test-defs.sh b/tests/test-defs.sh index 5a32d392..7e1739b4 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