Skip to content

Commit

Permalink
Allow USE_VALGRIND to be set to anything starting with 0, N or n to d…
Browse files Browse the repository at this point in the history
…isable valgrind during tests.
  • Loading branch information
hawicz committed Jul 15, 2017
1 parent c0b7d76 commit 40317f0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test-defs.sh
Expand Up @@ -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
Expand Down

0 comments on commit 40317f0

Please sign in to comment.