diff options
Diffstat (limited to 'build-aux/valgrind.sh')
-rwxr-xr-x | build-aux/valgrind.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/build-aux/valgrind.sh b/build-aux/valgrind.sh new file mode 100755 index 0000000..4db7477 --- /dev/null +++ b/build-aux/valgrind.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e + +export TESTS_ENVIRONMENT=" + ${VALGRIND:-valgrind} \ + --tool=memcheck \ + --leak-check=full \ + --leak-resolution=high \ + --num-callers=20 \ + --error-exitcode=1 \ + --show-possibly-lost=no" + +if [[ "${1}" == *.sh ]]; then + exec "${1}" +else + exec ${TESTS_ENVIRONMENT} "${1}" +fi |