Johannes Schindelin | 4e1be63 | 2009-02-04 00:25:59 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | base=$(basename "$0") |
| 4 | |
Johannes Schindelin | 5caa81d | 2009-02-05 22:03:00 +0100 | [diff] [blame] | 5 | TRACK_ORIGINS= |
| 6 | |
| 7 | VALGRIND_VERSION=$(valgrind --version) |
| 8 | VALGRIND_MAJOR=$(expr "$VALGRIND_VERSION" : '[^0-9]*\([0-9]*\)') |
| 9 | VALGRIND_MINOR=$(expr "$VALGRIND_VERSION" : '[^0-9]*[0-9]*\.\([0-9]*\)') |
| 10 | test 3 -gt "$VALGRIND_MAJOR" || |
| 11 | test 3 -eq "$VALGRIND_MAJOR" -a 4 -gt "$VALGRIND_MINOR" || |
| 12 | TRACK_ORIGINS=--track-origins=yes |
| 13 | |
Johannes Schindelin | 4e1be63 | 2009-02-04 00:25:59 +0100 | [diff] [blame] | 14 | exec valgrind -q --error-exitcode=126 \ |
| 15 | --leak-check=no \ |
| 16 | --suppressions="$GIT_VALGRIND/default.supp" \ |
| 17 | --gen-suppressions=all \ |
Johannes Schindelin | 5caa81d | 2009-02-05 22:03:00 +0100 | [diff] [blame] | 18 | $TRACK_ORIGINS \ |
Johannes Schindelin | 4e1be63 | 2009-02-04 00:25:59 +0100 | [diff] [blame] | 19 | --log-fd=4 \ |
| 20 | --input-fd=4 \ |
| 21 | $GIT_VALGRIND_OPTIONS \ |
| 22 | "$GIT_VALGRIND"/../../"$base" "$@" |