tests: using custom GIT_EXEC_PATH breaks --valgrind tests

Fix a regression in b7d11a0f5d2 (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 <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed May 12, 2022 at 15:32 UTC 58407e041e62a221d2ac823a42c41b23b2aa984b
2 files changed +3 -2
t/t0060-path-utils.sh
+2 -2
@@ -542,7 +542,7 @@ test_lazy_prereq CAN_EXEC_IN_PWD '
542 ./git rev-parse
543 '
544
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' '
546 mkdir -p pretend/bin pretend/libexec/git-core &&
547 echo "echo HERE" | write_script pretend/libexec/git-core/git-here &&
548 cp "$GIT_EXEC_PATH"/git$X pretend/bin/ &&
@@ -550,7 +550,7 @@ test_expect_success RUNTIME_PREFIX,CAN_EXEC_IN_PWD 'RUNTIME_PREFIX works' '
550 echo HERE >expect &&
551 test_cmp expect actual'
552
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' '
554 mkdir -p pretend/bin &&
555 cp "$GIT_EXEC_PATH"/git$X pretend/bin/ &&
556 git config yes.path "%(prefix)/yes" &&
t/test-lib.sh
+1
@@ -1666,6 +1666,7 @@ test -n "$USE_LIBPCRE2" && test_set_prereq PCRE
1666 test -n "$USE_LIBPCRE2" && test_set_prereq LIBPCRE2
1667 test -z "$NO_GETTEXT" && test_set_prereq GETTEXT
1668 test -n "$SANITIZE_LEAK" && test_set_prereq SANITIZE_LEAK
1669 +test -n "$GIT_VALGRIND_ENABLED" && test_set_prereq VALGRIND
1670
1671 if test -z "$GIT_TEST_CHECK_CACHE_TREE"
1672 then