blob: 582b4dca9497363c7bfd6ae5ecc2c98d28d5ac0a [file] [log] [blame]
Johannes Schindelin4e1be632009-02-04 00:25:59 +01001#!/bin/sh
2
3base=$(basename "$0")
4
Johannes Schindelin5caa81d2009-02-05 22:03:00 +01005TRACK_ORIGINS=
6
7VALGRIND_VERSION=$(valgrind --version)
8VALGRIND_MAJOR=$(expr "$VALGRIND_VERSION" : '[^0-9]*\([0-9]*\)')
9VALGRIND_MINOR=$(expr "$VALGRIND_VERSION" : '[^0-9]*[0-9]*\.\([0-9]*\)')
10test 3 -gt "$VALGRIND_MAJOR" ||
11test 3 -eq "$VALGRIND_MAJOR" -a 4 -gt "$VALGRIND_MINOR" ||
12TRACK_ORIGINS=--track-origins=yes
13
Johannes Schindelin4e1be632009-02-04 00:25:59 +010014exec valgrind -q --error-exitcode=126 \
15 --leak-check=no \
16 --suppressions="$GIT_VALGRIND/default.supp" \
17 --gen-suppressions=all \
Johannes Schindelin5caa81d2009-02-05 22:03:00 +010018 $TRACK_ORIGINS \
Johannes Schindelin4e1be632009-02-04 00:25:59 +010019 --log-fd=4 \
20 --input-fd=4 \
21 $GIT_VALGRIND_OPTIONS \
22 "$GIT_VALGRIND"/../../"$base" "$@"