Skip to content

Commit 58407e0

Browse files
avargitster
authored andcommitted
tests: using custom GIT_EXEC_PATH breaks --valgrind tests
Fix a regression in b7d11a0 (tests: exercise the RUNTIME_PREFIX feature, 2021-07-24) where tests that want to set up and test a "git" wrapper in $PATH conflicted with the t/bin/valgrind wrapper(s) doing the same. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6cd33dc commit 58407e0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

t/t0060-path-utils.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,15 +542,15 @@ test_lazy_prereq CAN_EXEC_IN_PWD '
542542
./git rev-parse
543543
'
544544

545-
test_expect_success RUNTIME_PREFIX,CAN_EXEC_IN_PWD 'RUNTIME_PREFIX works' '
545+
test_expect_success !VALGRIND,RUNTIME_PREFIX,CAN_EXEC_IN_PWD 'RUNTIME_PREFIX works' '
546546
mkdir -p pretend/bin pretend/libexec/git-core &&
547547
echo "echo HERE" | write_script pretend/libexec/git-core/git-here &&
548548
cp "$GIT_EXEC_PATH"/git$X pretend/bin/ &&
549549
GIT_EXEC_PATH= ./pretend/bin/git here >actual &&
550550
echo HERE >expect &&
551551
test_cmp expect actual'
552552

553-
test_expect_success RUNTIME_PREFIX,CAN_EXEC_IN_PWD '%(prefix)/ works' '
553+
test_expect_success !VALGRIND,RUNTIME_PREFIX,CAN_EXEC_IN_PWD '%(prefix)/ works' '
554554
mkdir -p pretend/bin &&
555555
cp "$GIT_EXEC_PATH"/git$X pretend/bin/ &&
556556
git config yes.path "%(prefix)/yes" &&

t/test-lib.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,6 +1666,7 @@ test -n "$USE_LIBPCRE2" && test_set_prereq PCRE
16661666
test -n "$USE_LIBPCRE2" && test_set_prereq LIBPCRE2
16671667
test -z "$NO_GETTEXT" && test_set_prereq GETTEXT
16681668
test -n "$SANITIZE_LEAK" && test_set_prereq SANITIZE_LEAK
1669+
test -n "$GIT_VALGRIND_ENABLED" && test_set_prereq VALGRIND
16691670

16701671
if test -z "$GIT_TEST_CHECK_CACHE_TREE"
16711672
then

0 commit comments

Comments
 (0)