aboutsummaryrefslogtreecommitdiffstats
path: root/t/valgrind
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-11-29 13:28:00 -0800
committerJunio C Hamano <gitster@pobox.com>2016-11-29 13:28:00 -0800
commit91207f378460d91c2097e1135ac69fd73f797ff8 (patch)
tree73b093d8ee0a6da9a618d3c98e37c908ff02f4aa /t/valgrind
parent6afadbd5ee4557982a7c049bb5bb539a5b21775f (diff)
parent28fab7b23d0f9f15745c99baf25ec49e38594aa5 (diff)
downloadgit-91207f378460d91c2097e1135ac69fd73f797ff8.tar.gz
Merge branch 'nd/test-helpers' into maint
Update to the test framework made in 2.9 timeframe broke running the tests under valgrind, which has been fixed. * nd/test-helpers: valgrind: support test helpers
Diffstat (limited to 't/valgrind')
-rwxr-xr-xt/valgrind/valgrind.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/t/valgrind/valgrind.sh b/t/valgrind/valgrind.sh
index 42153036dc..669ebaf68b 100755
--- a/t/valgrind/valgrind.sh
+++ b/t/valgrind/valgrind.sh
@@ -1,11 +1,19 @@
#!/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 "$GIT_VALGRIND"/../../"$base" "$@"
+exec "$program" "$@"
case "$GIT_VALGRIND_MODE" in
memcheck-fast)
@@ -29,4 +37,4 @@ exec valgrind -q --error-exitcode=126 \
--log-fd=4 \
--input-fd=4 \
$GIT_VALGRIND_OPTIONS \
- "$GIT_VALGRIND"/../../"$base" "$@"
+ "$program" "$@"