]> git.ipfire.org Git - thirdparty/git.git/commitdiff
tests: using custom GIT_EXEC_PATH breaks --valgrind tests
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 12 May 2022 22:32:15 +0000 (15:32 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 May 2022 22:42:26 +0000 (15:42 -0700)
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>
t/t0060-path-utils.sh
t/test-lib.sh

index 2fe6ae6a4e544cb4f58ad96e22ee6b24c076de94..aa35350b6f396f562463a16ffcba364ab94ed5d5 100755 (executable)
@@ -542,7 +542,7 @@ test_lazy_prereq CAN_EXEC_IN_PWD '
        ./git rev-parse
 '
 
-test_expect_success RUNTIME_PREFIX,CAN_EXEC_IN_PWD 'RUNTIME_PREFIX works' '
+test_expect_success !VALGRIND,RUNTIME_PREFIX,CAN_EXEC_IN_PWD 'RUNTIME_PREFIX works' '
        mkdir -p pretend/bin pretend/libexec/git-core &&
        echo "echo HERE" | write_script pretend/libexec/git-core/git-here &&
        cp "$GIT_EXEC_PATH"/git$X pretend/bin/ &&
@@ -550,7 +550,7 @@ test_expect_success RUNTIME_PREFIX,CAN_EXEC_IN_PWD 'RUNTIME_PREFIX works' '
        echo HERE >expect &&
        test_cmp expect actual'
 
-test_expect_success RUNTIME_PREFIX,CAN_EXEC_IN_PWD '%(prefix)/ works' '
+test_expect_success !VALGRIND,RUNTIME_PREFIX,CAN_EXEC_IN_PWD '%(prefix)/ works' '
        mkdir -p pretend/bin &&
        cp "$GIT_EXEC_PATH"/git$X pretend/bin/ &&
        git config yes.path "%(prefix)/yes" &&
index 531cef097db0c6110ba2c6dce403912f402a6c95..7f3d323e93726b402d6add246eae81585658d05e 100644 (file)
@@ -1666,6 +1666,7 @@ test -n "$USE_LIBPCRE2" && test_set_prereq PCRE
 test -n "$USE_LIBPCRE2" && test_set_prereq LIBPCRE2
 test -z "$NO_GETTEXT" && test_set_prereq GETTEXT
 test -n "$SANITIZE_LEAK" && test_set_prereq SANITIZE_LEAK
+test -n "$GIT_VALGRIND_ENABLED" && test_set_prereq VALGRIND
 
 if test -z "$GIT_TEST_CHECK_CACHE_TREE"
 then