l10n: git.pot: v2.11.0 round 2 (1 new, 1 removed)
[gitweb.git] / t / valgrind / valgrind.sh
index 472ac2deedc7120da8d7771517c9ca43a46c2cb6..669ebaf68be006ee53911f02da72e56cb5a100f0 100755 (executable)
@@ -1,10 +1,23 @@
 #!/bin/sh
 
 base=$(basename "$0")
+case "$base" in
+test-*)
+       program="$GIT_VALGRIND/../../t/helper/$base"
+       ;;
+*)
+       program="$GIT_VALGRIND/../../$base"
+       ;;
+esac
 
 TOOL_OPTIONS='--leak-check=no'
 
+test -z "$GIT_VALGRIND_ENABLED" &&
+exec "$program" "$@"
+
 case "$GIT_VALGRIND_MODE" in
+memcheck-fast)
+       ;;
 memcheck)
        VALGRIND_VERSION=$(valgrind --version)
        VALGRIND_MAJOR=$(expr "$VALGRIND_VERSION" : '[^0-9]*\([0-9]*\)')
@@ -24,4 +37,4 @@ exec valgrind -q --error-exitcode=126 \
        --log-fd=4 \
        --input-fd=4 \
        $GIT_VALGRIND_OPTIONS \
-       "$GIT_VALGRIND"/../../"$base" "$@"
+       "$program" "$@"