diff options
| author | Michael Biebl <biebl@debian.org> | 2015-01-22 00:29:39 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2015-01-22 00:29:39 +0100 |
| commit | 2c032d8f1c6292c1338a615e6ec40252889ba85c (patch) | |
| tree | 1f77182220b2b0264288ba4a476ab47e5bc48716 /tools/run-test-valgrind.sh | |
| parent | 33491bc4279481db8ae47213e34a6d695a0e8830 (diff) | |
Imported Upstream version 1.0.0 upstream/1.0.0
Diffstat (limited to 'tools/run-test-valgrind.sh')
| -rwxr-xr-x | tools/run-test-valgrind.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/run-test-valgrind.sh b/tools/run-test-valgrind.sh new file mode 100755 index 00000000..506fff75 --- /dev/null +++ b/tools/run-test-valgrind.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +LIBTOOL="$1"; shift +VALGRIND="$1"; shift +SUPPRESSIONS="$1"; shift +TEST="$1"; shift + +LOGFILE="valgrind-`echo "$TEST" | tr -cd '[:alpha:]-'`.log" + +export G_SLICE=always-malloc +export G_DEBUG=gc-friendly +$LIBTOOL --mode=execute "$VALGRIND" \ + --quiet \ + --error-exitcode=1 \ + --leak-check=full \ + --gen-suppressions=all \ + --suppressions="$SUPPRESSIONS" \ + --log-file="$LOGFILE" \ + "$TEST" +RESULT=$? + +if [ $RESULT -ne 0 ]; then + echo "Don't forget to check the valgrind log at '`realpath $LOGFILE`'." >&2 +fi + +exit $RESULT |