diff options
author | René Scharfe <l.s.r@web.de> | 2016-10-28 01:14:00 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-28 09:33:53 +0300 |
commit | 28fab7b23d0f9f15745c99baf25ec49e38594aa5 (patch) | |
tree | c8c40964bad085370e60970ba065f8a4845c83f7 /t/test-lib.sh | |
parent | 503e22418082d1ec616ec98ab90c6a73cd3ef96f (diff) |
valgrind: support test helpers
Tests run with --valgrind call git commands through a wrapper script
that invokes valgrind on them. This script (valgrind.sh) is in turn
invoked through symlinks created for each command in t/valgrind/bin/.
Since e6e7530d (test helpers: move test-* to t/helper/ subdirectory)
these symlinks have been broken for test helpers -- they point to the
old locations in the root of the build directory. Fix that by teaching
the code for creating the links about the new location of the binaries,
and do the same in the wrapper script to allow it to find its payload.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r-- | t/test-lib.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index 0c966f3eaa..bbaf9a13e1 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -766,7 +766,14 @@ then return; base=$(basename "$1") - symlink_target=$GIT_BUILD_DIR/$base + case "$base" in + test-*) + symlink_target="$GIT_BUILD_DIR/t/helper/$base" + ;; + *) + symlink_target="$GIT_BUILD_DIR/$base" + ;; + esac # do not override scripts if test -x "$symlink_target" && test ! -d "$symlink_target" && |