Merge branch 'nd/test-helpers'

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
This commit is contained in:
Junio C Hamano 2016-10-31 13:15:27 -07:00
Родитель 590f0bfe9f 28fab7b23d
Коммит ab3ad63c9a
2 изменённых файлов: 18 добавлений и 3 удалений

Просмотреть файл

@ -809,7 +809,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" &&

Просмотреть файл

@ -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" "$@"