]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t: introduce PERL_TEST_HELPERS prerequisite
authorPatrick Steinhardt <ps@pks.im>
Thu, 3 Apr 2025 05:05:57 +0000 (07:05 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Apr 2025 21:47:37 +0000 (14:47 -0700)
In the early days of Git, Perl was used quite prominently throughout the
project. This has changed significantly as almost all of the executables
we ship nowadays have eventually been rewritten in C. Only a handful of
subsystems remain that require Perl:

  - gitweb, a read-only web interface.

  - A couple of scripts that allow importing repositories from GNU Arch,
    CVS and Subversion.

  - git-send-email(1), which can be used to send mails.

  - git-request-pull(1), which is used to request somebody to pull from
    a URL by sending an email.

  - git-filter-branch(1), which uses Perl with the `--state-branch`
    option. This command is typically recommended against nowadays in
    favor of git-filter-repo(1).

  - Our Perl bindings for Git.

  - The netrc Git credential helper.

None of these subsystems can really be considered to be part of the
"core" of Git, and an installation without them is fully functional.
It is more likely than not that an end user wouldn't even notice that
any features are missing if those tools weren't installed. But while
Perl nowadays very much is an optional dependency of Git, there is a
significant limitation when Perl isn't available: developers cannot run
our test suite.

Preceding commits have started to lift this restriction by removing the
strict dependency on Perl in many central parts of the test library. But
there are still many tests that rely on small Perl helpers to do various
different things.

Introduce a new PERL_TEST_HELPERS prerequisite that guards all tests
that require Perl. This prerequisite is explicitly different than the
preexisting PERL prerequisite:

  - PERL records whether or not features depending on the Perl
    interpreter are built.

  - PERL_TEST_HELPERS records whether or not a Perl interpreter is
    available for our tests.

By having these two separate prerequisites we can thus distinguish
between tests that inherently depend on Perl because the underlying
feature does, and those tests that depend on Perl because the test
itself is using Perl.

Adapt all tests to set the PERL_TEST_HELPERS prerequisite as needed.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
71 files changed:
t/t0008-ignores.sh
t/t0021-conversion.sh
t/t0210-trace2-normal.sh
t/t0211-trace2-perf.sh
t/t0610-reftable-basics.sh
t/t0613-reftable-write-options.sh
t/t1006-cat-file.sh
t/t1007-hash-object.sh
t/t1010-mktree.sh
t/t1450-fsck.sh
t/t3300-funny-names.sh
t/t4013-diff-various.sh
t/t4014-format-patch.sh
t/t4020-diff-external.sh
t/t4029-diff-trailing-space.sh
t/t4030-diff-textconv.sh
t/t4031-diff-rewrite-binary.sh
t/t4058-diff-duplicates.sh
t/t4103-apply-binary.sh
t/t4116-apply-reverse.sh
t/t4150-am.sh
t/t4200-rerere.sh
t/t4205-log-pretty-formats.sh
t/t4216-log-bloom.sh
t/t5004-archive-corner-cases.sh
t/t5300-pack-object.sh
t/t5303-pack-corruption-resilience.sh
t/t5310-pack-bitmaps.sh
t/t5316-pack-delta-depth.sh
t/t5318-commit-graph.sh
t/t5319-multi-pack-index.sh
t/t5324-split-commit-graph.sh
t/t5326-multi-pack-bitmaps.sh
t/t5328-commit-graph-64bit-time.sh
t/t5333-pseudo-merge-bitmaps.sh
t/t5400-send-pack.sh
t/t5410-receive-pack-alternates.sh
t/t5503-tagfollow.sh
t/t5504-fetch-receive-strict.sh
t/t5510-fetch.sh
t/t5532-fetch-proxy.sh
t/t5534-push-signed.sh
t/t5537-fetch-shallow.sh
t/t5551-http-fetch-smart.sh
t/t5562-http-backend-content-length.sh
t/t5601-clone.sh
t/t5616-partial-clone.sh
t/t5701-git-serve.sh
t/t5702-protocol-v2.sh
t/t5703-upload-pack-ref-in-want.sh
t/t5710-promisor-remote-capability.sh
t/t6002-rev-list-bisect.sh
t/t6003-rev-list-topo-order.sh
t/t6011-rev-list-with-bad-commit.sh
t/t6013-rev-list-reverse-parents.sh
t/t6102-rev-list-unexpected-objects.sh
t/t6115-rev-list-du.sh
t/t6300-for-each-ref.sh
t/t7006-pager.sh
t/t7416-submodule-dash-url.sh
t/t7508-status.sh
t/t7815-grep-binary.sh
t/t8001-annotate.sh
t/t8002-blame.sh
t/t8006-blame-textconv.sh
t/t8011-blame-split-file.sh
t/t8012-blame-colors.sh
t/t9137-git-svn-dcommit-clobber-series.sh
t/t9350-fast-export.sh
t/t9850-shell.sh
t/test-lib.sh

index c9376dffb58872787abc22a8654327d95ba256fb..1aaa6bf5ae86430e8b246f4a8cc226b73880f4ed 100755 (executable)
@@ -5,6 +5,12 @@ test_description=check-ignore
 TEST_CREATE_REPO_NO_TEMPLATE=1
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping ignores tests; Perl not available'
+       test_done
+fi
+
 init_vars () {
        global_excludes="global-excludes"
 }
index 3f6433d3045826f776fe932c30a4aa5bef358d48..9c3738ebb3f00f5513686243273a50a7fdd18ba3 100755 (executable)
@@ -619,7 +619,7 @@ test_expect_success 'required process filter should be used only for "clean" ope
        )
 '
 
-test_expect_success 'required process filter should process multiple packets' '
+test_expect_success PERL_TEST_HELPERS 'required process filter should process multiple packets' '
        test_config_global filter.protocol.process "test-tool rot13-filter --log=debug.log clean smudge" &&
        test_config_global filter.protocol.required true &&
 
@@ -684,7 +684,7 @@ test_expect_success 'required process filter should process multiple packets' '
        )
 '
 
-test_expect_success 'required process filter with clean error should fail' '
+test_expect_success PERL_TEST_HELPERS 'required process filter with clean error should fail' '
        test_config_global filter.protocol.process "test-tool rot13-filter --log=debug.log clean smudge" &&
        test_config_global filter.protocol.required true &&
        rm -rf repo &&
index 4287ed3fbb3d412d2b39bdfe381e7ad1dcddafce..ba4c0442b85d00442d7f44a51e49a6652de4f935 100755 (executable)
@@ -4,6 +4,12 @@ test_description='test trace2 facility (normal target)'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping trace2 tests; Perl not available'
+       test_done
+fi
+
 # Turn off any inherited trace2 settings for this test.
 sane_unset GIT_TRACE2 GIT_TRACE2_PERF GIT_TRACE2_EVENT
 sane_unset GIT_TRACE2_BRIEF
index bac90465406d94743236024c20dbfdaf78782471..760cf69087f079a76b4f608f16186c587cdd919a 100755 (executable)
@@ -4,6 +4,12 @@ test_description='test trace2 facility (perf target)'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping trace2 tests; Perl not available'
+       test_done
+fi
+
 # Turn off any inherited trace2 settings for this test.
 sane_unset GIT_TRACE2 GIT_TRACE2_PERF GIT_TRACE2_EVENT
 sane_unset GIT_TRACE2_PERF_BRIEF
index 4618ffc108edd8f523a7ffb0d7f9c61fd3ab3734..5e0a1fa176dbd763295ab2be5e8528b8a98051cf 100755 (executable)
@@ -643,7 +643,7 @@ test_expect_success 'basic: commit and list refs' '
        test_cmp actual expect
 '
 
-test_expect_success 'basic: can write large commit message' '
+test_expect_success PERL_TEST_HELPERS 'basic: can write large commit message' '
        test_when_finished "rm -rf repo" &&
        git init repo &&
        perl -e "
index e2708e11d5b941cf707d3c22466e4cc6957d0302..fa1e2f9eef8b88a8aaeecfa03ee57159f2e88926 100755 (executable)
@@ -139,7 +139,7 @@ test_expect_success 'small block size leads to multiple ref blocks' '
        )
 '
 
-test_expect_success 'small block size fails with large reflog message' '
+test_expect_success PERL_TEST_HELPERS 'small block size fails with large reflog message' '
        test_when_finished "rm -rf repo" &&
        git init repo &&
        (
index 398865d6ebe9c6394247ded854c6a71f3aa10520..a574da3df531c8f3e3b3da005c6ab6344275158e 100755 (executable)
@@ -1270,7 +1270,7 @@ extract_batch_output () {
     ' "$@"
 }
 
-test_expect_success 'cat-file --batch-all-objects --batch ignores replace' '
+test_expect_success PERL_TEST_HELPERS 'cat-file --batch-all-objects --batch ignores replace' '
        git cat-file --batch-all-objects --batch >actual.raw &&
        extract_batch_output $orig <actual.raw >actual &&
        {
index a0481139de5519bf65a3320f21dfd72e97a4f6f5..b3cf53ff8c9f797d80a5c2f804df3636805c4856 100755 (executable)
@@ -205,7 +205,7 @@ test_expect_success 'too-short tree' '
        grep "too-short tree object" err
 '
 
-test_expect_success 'malformed mode in tree' '
+test_expect_success PERL_TEST_HELPERS 'malformed mode in tree' '
        hex_oid=$(echo foo | git hash-object --stdin -w) &&
        bin_oid=$(echo $hex_oid | hex2oct) &&
        printf "9100644 \0$bin_oid" >tree-with-malformed-mode &&
@@ -213,7 +213,7 @@ test_expect_success 'malformed mode in tree' '
        grep "malformed mode in tree entry" err
 '
 
-test_expect_success 'empty filename in tree' '
+test_expect_success PERL_TEST_HELPERS 'empty filename in tree' '
        hex_oid=$(echo foo | git hash-object --stdin -w) &&
        bin_oid=$(echo $hex_oid | hex2oct) &&
        printf "100644 \0$bin_oid" >tree-with-empty-filename &&
@@ -221,7 +221,7 @@ test_expect_success 'empty filename in tree' '
        grep "empty filename in tree entry" err
 '
 
-test_expect_success 'duplicate filename in tree' '
+test_expect_success PERL_TEST_HELPERS 'duplicate filename in tree' '
        hex_oid=$(echo foo | git hash-object --stdin -w) &&
        bin_oid=$(echo $hex_oid | hex2oct) &&
        {
index c291a2b33d79b7af79b4039cf41a0d9dd1e2bc17..4977998e2055ccc3829f0317ef3d15f344f4698f 100755 (executable)
@@ -41,13 +41,13 @@ test_expect_success 'ls-tree piped to mktree (2)' '
        test_cmp tree.withsub actual
 '
 
-test_expect_success 'ls-tree output in wrong order given to mktree (1)' '
+test_expect_success PERL_TEST_HELPERS 'ls-tree output in wrong order given to mktree (1)' '
        perl -e "print reverse <>" <top |
        git mktree >actual &&
        test_cmp tree actual
 '
 
-test_expect_success 'ls-tree output in wrong order given to mktree (2)' '
+test_expect_success PERL_TEST_HELPERS 'ls-tree output in wrong order given to mktree (2)' '
        perl -e "print reverse <>" <top.withsub |
        git mktree >actual &&
        test_cmp tree.withsub actual
index 8a456b1142d1cc463f97c5e8809bcfc83ffa1e96..0105045376245a377ea5e99cab3ab5353ca0c6a2 100755 (executable)
@@ -346,7 +346,7 @@ test_expect_success 'unparseable tree object' '
        test_grep ! "fatal: empty filename in tree entry" out
 '
 
-test_expect_success 'tree entry with type mismatch' '
+test_expect_success PERL_TEST_HELPERS 'tree entry with type mismatch' '
        test_when_finished "remove_object \$blob" &&
        test_when_finished "remove_object \$tree" &&
        test_when_finished "remove_object \$commit" &&
@@ -364,7 +364,7 @@ test_expect_success 'tree entry with type mismatch' '
        test_grep ! "dangling blob" out
 '
 
-test_expect_success 'tree entry with bogus mode' '
+test_expect_success PERL_TEST_HELPERS 'tree entry with bogus mode' '
        test_when_finished "remove_object \$blob" &&
        test_when_finished "remove_object \$tree" &&
        blob=$(echo blob | git hash-object -w --stdin) &&
@@ -984,7 +984,7 @@ corrupt_index_checksum () {
 
 # Corrupt the checksum on the index and then
 # verify that only fsck notices.
-test_expect_success 'detect corrupt index file in fsck' '
+test_expect_success PERL_TEST_HELPERS 'detect corrupt index file in fsck' '
        cp .git/index .git/index.backup &&
        test_when_finished "mv .git/index.backup .git/index" &&
        corrupt_index_checksum &&
index f5bf16abcd8ce2aae5929129913cbb8927b06539..502b1572059b3f9212c54e81add5941747d8c0a5 100755 (executable)
@@ -63,7 +63,7 @@ test_expect_success 'ls-files quotes funny filename' '
        test_cmp expected current
 '
 
-test_expect_success 'ls-files -z does not quote funny filename' '
+test_expect_success PERL_TEST_HELPERS 'ls-files -z does not quote funny filename' '
        cat >expected <<-\EOF &&
        just space
        no-funny
@@ -101,7 +101,7 @@ test_expect_success 'diff-tree --name-status quotes funny filename' '
        test_cmp expected current
 '
 
-test_expect_success 'diff-index -z does not quote funny filename' '
+test_expect_success PERL_TEST_HELPERS 'diff-index -z does not quote funny filename' '
        cat >expected <<-\EOF &&
        A
        tabs    ," (dq) and spaces
@@ -111,7 +111,7 @@ test_expect_success 'diff-index -z does not quote funny filename' '
        test_cmp expected current
 '
 
-test_expect_success 'diff-tree -z does not quote funny filename' '
+test_expect_success PERL_TEST_HELPERS 'diff-tree -z does not quote funny filename' '
        cat >expected <<-\EOF &&
        A
        tabs    ," (dq) and spaces
index 3855d68dbc0a64797ddbd665e675aa3d1549defc..782d97fb7df2694d1a8a07765571f0b8e3a6bfa6 100755 (executable)
@@ -11,6 +11,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping diff various tests; Perl not available'
+       test_done
+fi
+
 test_expect_success setup '
 
        GIT_AUTHOR_DATE="2006-06-26 00:00:00 +0000" &&
index 884f83fb8a45fe927f6763342a3e1b8a8a04c624..2782b1fc183e8f1247e9b3f75a95f32569fdfc88 100755 (executable)
@@ -448,7 +448,7 @@ cat >>expect.no-threading <<EOF
 ---
 EOF
 
-test_expect_success 'no threading' '
+test_expect_success PERL_TEST_HELPERS 'no threading' '
        git checkout side &&
        check_threading expect.no-threading main
 '
@@ -466,11 +466,11 @@ In-Reply-To: <0>
 References: <0>
 EOF
 
-test_expect_success 'thread' '
+test_expect_success PERL_TEST_HELPERS 'thread' '
        check_threading expect.thread --thread main
 '
 
-test_expect_success '--thread overrides format.thread=deep' '
+test_expect_success PERL_TEST_HELPERS '--thread overrides format.thread=deep' '
        test_config format.thread deep &&
        check_threading expect.thread --thread main
 '
@@ -490,7 +490,7 @@ In-Reply-To: <1>
 References: <1>
 EOF
 
-test_expect_success 'thread in-reply-to' '
+test_expect_success PERL_TEST_HELPERS 'thread in-reply-to' '
        check_threading expect.in-reply-to --in-reply-to="<test.message>" \
                --thread main
 '
@@ -512,7 +512,7 @@ In-Reply-To: <0>
 References: <0>
 EOF
 
-test_expect_success 'thread cover-letter' '
+test_expect_success PERL_TEST_HELPERS 'thread cover-letter' '
        check_threading expect.cover-letter --cover-letter --thread main
 '
 
@@ -538,12 +538,12 @@ References: <1>
        <0>
 EOF
 
-test_expect_success 'thread cover-letter in-reply-to' '
+test_expect_success PERL_TEST_HELPERS 'thread cover-letter in-reply-to' '
        check_threading expect.cl-irt --cover-letter \
                --in-reply-to="<test.message>" --thread main
 '
 
-test_expect_success 'thread explicit shallow' '
+test_expect_success PERL_TEST_HELPERS 'thread explicit shallow' '
        check_threading expect.cl-irt --cover-letter \
                --in-reply-to="<test.message>" --thread=shallow main
 '
@@ -562,7 +562,7 @@ References: <0>
        <1>
 EOF
 
-test_expect_success 'thread deep' '
+test_expect_success PERL_TEST_HELPERS 'thread deep' '
        check_threading expect.deep --thread=deep main
 '
 
@@ -584,7 +584,7 @@ References: <1>
        <2>
 EOF
 
-test_expect_success 'thread deep in-reply-to' '
+test_expect_success PERL_TEST_HELPERS 'thread deep in-reply-to' '
        check_threading expect.deep-irt  --thread=deep \
                --in-reply-to="<test.message>" main
 '
@@ -609,7 +609,7 @@ References: <0>
        <2>
 EOF
 
-test_expect_success 'thread deep cover-letter' '
+test_expect_success PERL_TEST_HELPERS 'thread deep cover-letter' '
        check_threading expect.deep-cl --cover-letter --thread=deep main
 '
 
@@ -638,27 +638,27 @@ References: <1>
        <3>
 EOF
 
-test_expect_success 'thread deep cover-letter in-reply-to' '
+test_expect_success PERL_TEST_HELPERS 'thread deep cover-letter in-reply-to' '
        check_threading expect.deep-cl-irt --cover-letter \
                --in-reply-to="<test.message>" --thread=deep main
 '
 
-test_expect_success 'thread via config' '
+test_expect_success PERL_TEST_HELPERS 'thread via config' '
        test_config format.thread true &&
        check_threading expect.thread main
 '
 
-test_expect_success 'thread deep via config' '
+test_expect_success PERL_TEST_HELPERS 'thread deep via config' '
        test_config format.thread deep &&
        check_threading expect.deep main
 '
 
-test_expect_success 'thread config + override' '
+test_expect_success PERL_TEST_HELPERS 'thread config + override' '
        test_config format.thread deep &&
        check_threading expect.thread --thread main
 '
 
-test_expect_success 'thread config + --no-thread' '
+test_expect_success PERL_TEST_HELPERS 'thread config + --no-thread' '
        test_config format.thread deep &&
        check_threading expect.no-threading --no-thread main
 '
index f1efe482a5942752f514869e953ddc5280ea8f62..189294de7ef8f6b276f0b07784098ea48ce9284f 100755 (executable)
@@ -239,7 +239,7 @@ check_external_diff 128 empty  error 2 on  --quiet
 
 echo NULZbetweenZwords | perl -pe 'y/Z/\000/' > file
 
-test_expect_success 'force diff with "diff"' '
+test_expect_success PERL_TEST_HELPERS 'force diff with "diff"' '
        after=$(git hash-object file) &&
        after=$(git rev-parse --short $after) &&
        echo >.gitattributes "file diff" &&
@@ -300,7 +300,7 @@ test_expect_success 'external diff with autocrlf = true' '
        test $(wc -l <crlfed.txt) = $(keep_only_cr <crlfed.txt | wc -c)
 '
 
-test_expect_success 'diff --cached' '
+test_expect_success PERL_TEST_HELPERS 'diff --cached' '
        test_config core.autocrlf true &&
        git add file &&
        git update-index --assume-unchanged file &&
index 32b6e9a4e76217d8de771b405dd3ce57c73643ad..a92a42990b13c89393c52d553c5e5556158bc664 100755 (executable)
@@ -18,7 +18,7 @@ index 5f6a263..8cb8bae 100644
 EOF
 exit 1
 
-test_expect_success "$test_description" '
+test_expect_success PERL_TEST_HELPERS "$test_description" '
        printf "\nx\n" > f &&
        before=$(git hash-object f) &&
        before=$(git rev-parse --short $before) &&
index daebf9796f595bdf49159668ccc44b46d59172cd..c7d8eb124535a1ce28f8dbd5b2155a6395f859fe 100755 (executable)
@@ -4,6 +4,12 @@ test_description='diff.*.textconv tests'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping diff textconv tests; Perl not available'
+       test_done
+fi
+
 find_diff() {
        sed '1,/^index /d' | sed '/^-- $/,$d'
 }
index c4394a27b56236aeda3c92df03aa19f9d8720190..cbe50b15772fd2884aac1d6613183e08ecace00a 100755 (executable)
@@ -70,7 +70,7 @@ test_expect_success 'setup textconv' '
        git config diff.foo.textconv "\"$(pwd)\""/dump
 '
 
-test_expect_success 'rewrite diff respects textconv' '
+test_expect_success PERL_TEST_HELPERS 'rewrite diff respects textconv' '
        git diff -B >diff &&
        grep "dissimilarity index" diff &&
        grep "^-61" diff &&
index 2fce4a98977b71de88448f07ea8dbcd8e110c649..16266dff2afd3894ba3799d7805b4896eeb0b6b5 100755 (executable)
@@ -13,6 +13,12 @@ test_description='test tree diff when trees have duplicate entries'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping diff duplicates tests; Perl not available'
+       test_done
+fi
+
 # make_tree_entry <mode> <mode> <sha1>
 #
 # We have to rely on perl here because not all printfs understand
index d370ecfe0d9eea752d81d02f50f5739bfc923b04..59d38793ae68a5ac1d88f162c16b04791a5e7eb2 100755 (executable)
@@ -11,6 +11,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping apply-binary tests; Perl not available'
+       test_done
+fi
+
 test_expect_success 'setup' '
        cat >file1 <<-\EOF &&
        A quick brown fox jumps over the lazy dog.
index 0784ba033a4e5a5a6d8d8eaabb0736401aaaf730..6f414ad27f5fa9f7a222fe711b1da774fb87d1f8 100755 (executable)
@@ -10,6 +10,12 @@ test_description='git apply in reverse
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping apply reverse tests; Perl not available'
+       test_done
+fi
+
 test_expect_success setup '
 
        test_write_lines a b c d e f g h i j k l m n >file1 &&
index 5e2b6c80eaedfcbc1600a24c425dd4127233ff32..4794510d70dc3cf90ae0678faf57d780ef098987 100755 (executable)
@@ -1073,7 +1073,7 @@ test_expect_success 'am --patch-format=mboxrd handles mboxrd' '
        test_cmp msg out
 '
 
-test_expect_success 'am works with multi-line in-body headers' '
+test_expect_success PERL_TEST_HELPERS 'am works with multi-line in-body headers' '
        FORTY="String that has a length of more than forty characters" &&
        LONG="$FORTY $FORTY" &&
        rm -fr .git/rebase-apply &&
index b0a3e84984185d3e88756bbdb98cb9a56a2233eb..50fe8b0fd05cc9403d4db66c6df681ddf39338dc 100755 (executable)
@@ -27,6 +27,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping rerere tests; Perl not available'
+       test_done
+fi
+
 test_expect_success 'setup' '
        cat >a1 <<-\EOF &&
        Some title
index f81e42a84d5adc32dd38dfffbe950a43523bd877..8f2ba98963feba0e81b10faad0ac017cb4d99a62 100755 (executable)
@@ -698,7 +698,7 @@ test_expect_success '%(trailers:only=no,only=true) shows only "key: value" trail
        test_cmp expect actual
 '
 
-test_expect_success '%(trailers:unfold) unfolds trailers' '
+test_expect_success PERL_TEST_HELPERS '%(trailers:unfold) unfolds trailers' '
        git log --no-walk --pretty="%(trailers:unfold)" >actual &&
        {
                unfold <trailers &&
@@ -707,7 +707,7 @@ test_expect_success '%(trailers:unfold) unfolds trailers' '
        test_cmp expect actual
 '
 
-test_expect_success ':only and :unfold work together' '
+test_expect_success PERL_TEST_HELPERS ':only and :unfold work together' '
        git log --no-walk --pretty="%(trailers:only,unfold)" >actual &&
        git log --no-walk --pretty="%(trailers:unfold,only)" >reverse &&
        test_cmp actual reverse &&
@@ -754,7 +754,7 @@ test_expect_success '%(trailers:key=foo) handles multiple lines even if folded'
        test_cmp expect actual
 '
 
-test_expect_success '%(trailers:key=foo,unfold) properly unfolds' '
+test_expect_success PERL_TEST_HELPERS '%(trailers:key=foo,unfold) properly unfolds' '
        git log --no-walk --pretty="format:%(trailers:key=Signed-Off-by,unfold)" >actual &&
        unfold <trailers | grep Signed-off-by >expect &&
        test_cmp expect actual
index 3f163dc396980f4dacce34b5209f50b870d5092f..8910d53cac1146eba4a21b8891fb053c95d2a9c0 100755 (executable)
@@ -738,20 +738,20 @@ check_corrupt_graph () {
        test_cmp expect.out out
 }
 
-test_expect_success 'Bloom reader notices too-small data chunk' '
+test_expect_success PERL_TEST_HELPERS 'Bloom reader notices too-small data chunk' '
        check_corrupt_graph BDAT clear 00000000 &&
        echo "warning: ignoring too-small changed-path chunk" \
                "(4 < 12) in commit-graph file" >expect.err &&
        test_cmp expect.err err
 '
 
-test_expect_success 'Bloom reader notices out-of-bounds filter offsets' '
+test_expect_success PERL_TEST_HELPERS 'Bloom reader notices out-of-bounds filter offsets' '
        check_corrupt_graph BIDX 12 FFFFFFFF &&
        # use grep to avoid depending on exact chunk size
        grep "warning: ignoring out-of-range offset (4294967295) for changed-path filter at pos 3 of .git/objects/info/commit-graph" err
 '
 
-test_expect_success 'Bloom reader notices too-small index chunk' '
+test_expect_success PERL_TEST_HELPERS 'Bloom reader notices too-small index chunk' '
        # replace the index with a single entry, making most
        # lookups out-of-bounds
        check_corrupt_graph BIDX clear 00000000 &&
@@ -760,7 +760,7 @@ test_expect_success 'Bloom reader notices too-small index chunk' '
        test_cmp expect.err err
 '
 
-test_expect_success 'Bloom reader notices out-of-order index offsets' '
+test_expect_success PERL_TEST_HELPERS 'Bloom reader notices out-of-order index offsets' '
        # we do not know any real offsets, but we can pick
        # something plausible; we should not get to the point of
        # actually reading from the bogus offsets anyway.
index 50344e17ca175db7d64ed384f78543134f68ff9e..51749951916008f8516b62fffb24437d47057025 100755 (executable)
@@ -4,6 +4,12 @@ test_description='test corner cases of git-archive'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping archive corner cases tests; Perl not available'
+       test_done
+fi
+
 # the 10knuls.tar file is used to test for an empty git generated tar
 # without having to invoke tar because an otherwise valid empty GNU tar
 # will be considered broken by {Open,Net}BSD tar
index 5ac8d39094b6537e94e6bc6c0f49953e82e69f46..143856c29f14aef7b69b01cb300445231b36dba9 100755 (executable)
@@ -7,6 +7,12 @@ test_description='git pack-object'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping pack-object tests; Perl not available'
+       test_done
+fi
+
 test_expect_success 'setup' '
        rm -f .git/index* &&
        perl -e "print \"a\" x 4096;" >a &&
index de58ca654a12158dfe6a81c30d6d14976ce2b137..ac5e370e1e41aa62e51331cc2b0c597665c032f8 100755 (executable)
@@ -99,7 +99,7 @@ test_expect_success '... and loose copy of first delta allows for partial recove
        git cat-file blob $blob_3 > /dev/null
 '
 
-test_expect_success 'create corruption in data of first object' '
+test_expect_success PERL_TEST_HELPERS 'create corruption in data of first object' '
        create_new_pack &&
        git prune-packed &&
        chmod +w ${pack}.pack &&
@@ -156,7 +156,7 @@ test_expect_success '... and then a repack "clears" the corruption' '
        git cat-file blob $blob_3 > /dev/null
 '
 
-test_expect_success 'create corruption in data of first delta' '
+test_expect_success PERL_TEST_HELPERS 'create corruption in data of first delta' '
        create_new_pack &&
        git prune-packed &&
        chmod +w ${pack}.pack &&
index 621bbbdd26ed211855a741a4e96400a8fe90b2b3..81987296235f6e6d4ac0a369e6bd98250bcf7604 100755 (executable)
@@ -395,7 +395,7 @@ test_bitmap_cases () {
                )
        '
 
-       test_expect_success 'pack.preferBitmapTips' '
+       test_expect_success PERL_TEST_HELPERS 'pack.preferBitmapTips' '
                git init repo &&
                test_when_finished "rm -fr repo" &&
                (
index 32cf4227451ff762414f53f415560399275ee8a3..cd947b5a5ef8e2e11228f02415bed88f7af35bf3 100755 (executable)
@@ -87,7 +87,7 @@ max_chain() {
 # packing heuristics. We double-check that our test case
 # actually produces a long chain. If it doesn't, it should be
 # adjusted (or scrapped if the heuristics have become too unreliable)
-test_expect_success 'packing produces a long delta' '
+test_expect_success PERL_TEST_HELPERS 'packing produces a long delta' '
        # Use --window=0 to make sure we are seeing reused deltas,
        # not computing a new long chain.
        pack=$(git pack-objects --all --window=0 </dev/null pack) &&
@@ -96,21 +96,21 @@ test_expect_success 'packing produces a long delta' '
        test_cmp expect actual
 '
 
-test_expect_success '--depth limits depth' '
+test_expect_success PERL_TEST_HELPERS '--depth limits depth' '
        pack=$(git pack-objects --all --depth=5 </dev/null pack) &&
        echo 5 >expect &&
        max_chain pack-$pack.pack >actual &&
        test_cmp expect actual
 '
 
-test_expect_success '--depth=0 disables deltas' '
+test_expect_success PERL_TEST_HELPERS '--depth=0 disables deltas' '
        pack=$(git pack-objects --all --depth=0 </dev/null pack) &&
        echo 0 >expect &&
        max_chain pack-$pack.pack >actual &&
        test_cmp expect actual
 '
 
-test_expect_success 'negative depth disables deltas' '
+test_expect_success PERL_TEST_HELPERS 'negative depth disables deltas' '
        pack=$(git pack-objects --all --depth=-1 </dev/null pack) &&
        echo 0 >expect &&
        max_chain pack-$pack.pack >actual &&
index f68f64cd85e32cc4c2f0da562482eb852d534fde..0b3404f58fe5f9d81165b7a187575525d41ed66b 100755 (executable)
@@ -837,7 +837,7 @@ check_corrupt_chunk () {
        test_cmp expect.out out
 }
 
-test_expect_success 'reader notices too-small oid fanout chunk' '
+test_expect_success PERL_TEST_HELPERS 'reader notices too-small oid fanout chunk' '
        # make it big enough that the graph file is plausible,
        # otherwise we hit an earlier check
        check_corrupt_chunk OIDF clear $(printf "000000%02x" $(test_seq 250)) &&
@@ -848,7 +848,7 @@ test_expect_success 'reader notices too-small oid fanout chunk' '
        test_cmp expect.err err
 '
 
-test_expect_success 'reader notices fanout/lookup table mismatch' '
+test_expect_success PERL_TEST_HELPERS 'reader notices fanout/lookup table mismatch' '
        check_corrupt_chunk OIDF 1020 "FFFFFFFF" &&
        cat >expect.err <<-\EOF &&
        error: commit-graph OID lookup chunk is the wrong size
@@ -857,7 +857,7 @@ test_expect_success 'reader notices fanout/lookup table mismatch' '
        test_cmp expect.err err
 '
 
-test_expect_success 'reader notices out-of-bounds fanout' '
+test_expect_success PERL_TEST_HELPERS 'reader notices out-of-bounds fanout' '
        # Rather than try to corrupt a specific hash, we will just
        # wreck them all. But we cannot just set them all to 0xFFFFFFFF or
        # similar, as they are used for hi/lo starts in a binary search (so if
@@ -873,7 +873,7 @@ test_expect_success 'reader notices out-of-bounds fanout' '
        test_cmp expect.err err
 '
 
-test_expect_success 'reader notices too-small commit data chunk' '
+test_expect_success PERL_TEST_HELPERS 'reader notices too-small commit data chunk' '
        check_corrupt_chunk CDAT clear 00000000 &&
        cat >expect.err <<-\EOF &&
        error: commit-graph commit data chunk is wrong size
@@ -882,7 +882,7 @@ test_expect_success 'reader notices too-small commit data chunk' '
        test_cmp expect.err err
 '
 
-test_expect_success 'reader notices out-of-bounds extra edge' '
+test_expect_success PERL_TEST_HELPERS 'reader notices out-of-bounds extra edge' '
        check_corrupt_chunk EDGE clear &&
        cat >expect.err <<-\EOF &&
        error: commit-graph extra-edges pointer out of bounds
@@ -890,7 +890,7 @@ test_expect_success 'reader notices out-of-bounds extra edge' '
        test_cmp expect.err err
 '
 
-test_expect_success 'reader notices too-small generations chunk' '
+test_expect_success PERL_TEST_HELPERS 'reader notices too-small generations chunk' '
        check_corrupt_chunk GDA2 clear 00000000 &&
        cat >expect.err <<-\EOF &&
        error: commit-graph generations chunk is wrong size
index 0f215ad2e88837bbff00a071668247d42af93fef..bd75dea9501ed7ba98fd23ed24da8843022383b7 100755 (executable)
@@ -1120,7 +1120,7 @@ corrupt_chunk () {
        corrupt_chunk_file $midx "$@"
 }
 
-test_expect_success 'reader notices too-small oid fanout chunk' '
+test_expect_success PERL_TEST_HELPERS 'reader notices too-small oid fanout chunk' '
        corrupt_chunk OIDF clear 00000000 &&
        test_must_fail git log 2>err &&
        cat >expect <<-\EOF &&
@@ -1130,7 +1130,7 @@ test_expect_success 'reader notices too-small oid fanout chunk' '
        test_cmp expect err
 '
 
-test_expect_success 'reader notices too-small oid lookup chunk' '
+test_expect_success PERL_TEST_HELPERS 'reader notices too-small oid lookup chunk' '
        corrupt_chunk OIDL clear 00000000 &&
        test_must_fail git log 2>err &&
        cat >expect <<-\EOF &&
@@ -1140,7 +1140,7 @@ test_expect_success 'reader notices too-small oid lookup chunk' '
        test_cmp expect err
 '
 
-test_expect_success 'reader notices too-small pack names chunk' '
+test_expect_success PERL_TEST_HELPERS 'reader notices too-small pack names chunk' '
        # There is no NUL to terminate the name here, so the
        # chunk is too short.
        corrupt_chunk PNAM clear 70656666 &&
@@ -1151,7 +1151,7 @@ test_expect_success 'reader notices too-small pack names chunk' '
        test_cmp expect err
 '
 
-test_expect_success 'reader handles unaligned chunks' '
+test_expect_success PERL_TEST_HELPERS 'reader handles unaligned chunks' '
        # A 9-byte PNAM means all of the subsequent chunks
        # will no longer be 4-byte aligned, but it is still
        # a valid one-pack chunk on its own (it is "foo.pack\0").
@@ -1165,7 +1165,7 @@ test_expect_success 'reader handles unaligned chunks' '
        test_cmp expect.err err
 '
 
-test_expect_success 'reader notices too-small object offset chunk' '
+test_expect_success PERL_TEST_HELPERS 'reader notices too-small object offset chunk' '
        corrupt_chunk OOFF clear 00000000 &&
        test_must_fail git log 2>err &&
        cat >expect <<-\EOF &&
@@ -1175,7 +1175,7 @@ test_expect_success 'reader notices too-small object offset chunk' '
        test_cmp expect err
 '
 
-test_expect_success 'reader bounds-checks large offset table' '
+test_expect_success PERL_TEST_HELPERS 'reader bounds-checks large offset table' '
        # re-use the objects64 dir here to cheaply get access to a midx
        # with large offsets.
        git init repo &&
@@ -1197,7 +1197,7 @@ test_expect_success 'reader bounds-checks large offset table' '
        )
 '
 
-test_expect_success 'reader notices too-small revindex chunk' '
+test_expect_success PERL_TEST_HELPERS 'reader notices too-small revindex chunk' '
        # We only get a revindex with bitmaps (and likewise only
        # load it when they are asked for).
        test_config repack.writeBitmaps true &&
@@ -1214,7 +1214,7 @@ test_expect_success 'reader notices too-small revindex chunk' '
        test_cmp expect.err err
 '
 
-test_expect_success 'reader notices out-of-bounds fanout' '
+test_expect_success PERL_TEST_HELPERS 'reader notices out-of-bounds fanout' '
        # This is similar to the out-of-bounds fanout test in t5318. The values
        # in adjacent entries should be large but not identical (they
        # are used as hi/lo starts for a binary search, which would then abort
index a32be3867df36ff785ce67f857bb732342101685..49a057cc2eb65d60c661fe80668cf787a1213cd4 100755 (executable)
@@ -401,7 +401,7 @@ test_expect_success 'verify across alternates' '
        )
 '
 
-test_expect_success 'reader bounds-checks base-graph chunk' '
+test_expect_success PERL_TEST_HELPERS 'reader bounds-checks base-graph chunk' '
        git clone --no-hardlinks . corrupt-base-chunk &&
        (
                cd corrupt-base-chunk &&
index d27557b9b042a125359d255d9845872cda656914..627f8b4efdc3908b398bb3387077539f85950fdf 100755 (executable)
@@ -153,7 +153,7 @@ test_midx_bitmap_cases () {
                )
        '
 
-       test_expect_success 'pack.preferBitmapTips' '
+       test_expect_success PERL_TEST_HELPERS 'pack.preferBitmapTips' '
                git init repo &&
                test_when_finished "rm -fr repo" &&
                (
index a766a3e3f84ff58ce2ba28fa370a51968f27743d..d8891e6a9224637b222f1111031fca04dfa14055 100755 (executable)
@@ -74,7 +74,7 @@ test_expect_success 'single commit with generation data exceeding UINT32_MAX' '
        git -C repo-uint32-max commit-graph verify
 '
 
-test_expect_success 'reader notices out-of-bounds generation overflow' '
+test_expect_success PERL_TEST_HELPERS 'reader notices out-of-bounds generation overflow' '
        graph=.git/objects/info/commit-graph &&
        test_when_finished "rm -rf $graph" &&
        git commit-graph write --reachable &&
index 3905cb6e4f1c7d2e6907371f2137597d488539b8..1059ff45fe4475064ce9bff4a29497ffe2b8943f 100755 (executable)
@@ -6,6 +6,12 @@ GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP=0
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping pseudo-merge bitmap tests; Perl not available'
+       test_done
+fi
+
 test_pseudo_merges () {
        test-tool bitmap dump-pseudo-merges
 }
index 3f81f16e1335ce6e7f3c8e8d164e140e26049e6f..571e8f1bc59361bc1af5a2c25b6819cf37bd3e2e 100755 (executable)
@@ -268,7 +268,7 @@ extract_ref_advertisement () {
        '
 }
 
-test_expect_success 'receive-pack de-dupes .have lines' '
+test_expect_success PERL_TEST_HELPERS 'receive-pack de-dupes .have lines' '
        git init shared &&
        git -C shared commit --allow-empty -m both &&
        git clone -s shared fork &&
index 0b28e4e452fe7e6da3269ff55e6e3b4f0fb91cea..6a009fdcd71f041a9f235e3a9119d0d0158511aa 100755 (executable)
@@ -20,7 +20,7 @@ extract_haves () {
        depacketize | perl -lne '/^(\S+) \.have/ and print $1'
 }
 
-test_expect_success 'with core.alternateRefsCommand' '
+test_expect_success PERL_TEST_HELPERS 'with core.alternateRefsCommand' '
        write_script fork/alternate-refs <<-\EOF &&
                git --git-dir="$1" for-each-ref \
                        --format="%(objectname)" \
@@ -33,7 +33,7 @@ test_expect_success 'with core.alternateRefsCommand' '
        test_cmp expect actual.haves
 '
 
-test_expect_success 'with core.alternateRefsPrefixes' '
+test_expect_success PERL_TEST_HELPERS 'with core.alternateRefsPrefixes' '
        test_config -C fork core.alternateRefsPrefixes "refs/heads/private" &&
        git rev-parse private/branch >expect &&
        printf "0000" | git receive-pack fork >actual &&
index 845ca43ea0a7d7db61d4c6be7ae162708bcd6b3c..febe44104177e1976caf713ae213152634f24b10 100755 (executable)
@@ -7,6 +7,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping tagfollow tests; Perl not available'
+       test_done
+fi
+
 # End state of the repository:
 #
 #         T - tag1          S - tag2
index 58074506c599b1744009b3d4a32bde19ebe4e768..438250c75ed0a2a98a27d73fa573075a19730216 100755 (executable)
@@ -359,7 +359,7 @@ test_expect_success \
        grep "Cannot demote unterminatedheader" act
 '
 
-test_expect_success 'badFilemode is not a strict error' '
+test_expect_success PERL_TEST_HELPERS 'badFilemode is not a strict error' '
        git init --bare badmode.git &&
        tree=$(
                cd badmode.git &&
index 5f350facf5edbb84748070760fd1888d065fde84..432a2264e6f5fca5b2741aaf9aef2010dab1e134 100755 (executable)
@@ -8,6 +8,12 @@ test_description='Per branch config variables affects "git fetch".
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-bundle.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping fetch tests; Perl not available'
+       test_done
+fi
+
 D=$(pwd)
 
 test_expect_success setup '
index 37558226290f43a1c3bd053ef76a4e73ef8811fc..95d0f33b29531cdd84eb7a94b68d136864bfbaf4 100755 (executable)
@@ -4,6 +4,12 @@ test_description='fetching via git:// using core.gitproxy'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping fetch proxy tests; Perl not available'
+       test_done
+fi
+
 test_expect_success 'setup remote repo' '
        git init remote &&
        (cd remote &&
index c91a62b77afcfba1bf1228c33717db77c7e45318..342d0423c92794437ac8b284571a4bd4516a64af 100755 (executable)
@@ -177,7 +177,7 @@ test_expect_success GPGSSH 'ssh signed push sends push certificate' '
        test_cmp expect dst/push-cert-status
 '
 
-test_expect_success GPG 'inconsistent push options in signed push not allowed' '
+test_expect_success GPG,PERL_TEST_HELPERS 'inconsistent push options in signed push not allowed' '
        # First, invoke receive-pack with dummy input to obtain its preamble.
        prepare_dst &&
        git -C dst config receive.certnonceseed sekrit &&
index 37f7547a4cadb22929d7f88d9d8e11e5059b9d32..77d20d191103542ce0946b83ddda9969d507461a 100755 (executable)
@@ -256,7 +256,7 @@ start_httpd
 
 REPO="$HTTPD_DOCUMENT_ROOT_PATH/repo"
 
-test_expect_success 'shallow fetches check connectivity before writing shallow file' '
+test_expect_success PERL_TEST_HELPERS 'shallow fetches check connectivity before writing shallow file' '
        rm -rf "$REPO" client &&
 
        git init "$REPO" &&
index 761fdfcfe6c49d41b33033304f43fd0a5698f5fb..b0d4ea78015a2579bf78b1f2665639560d6bd6dc 100755 (executable)
@@ -7,6 +7,13 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-httpd.sh
+
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping http fetch smart tests; Perl not available'
+       test_done
+fi
+
 test "$HTTP_PROTO" = "HTTP/2" && enable_http2
 start_httpd
 
index f3b158274c4cc7c48004f5dead8315a65ed3b20f..b6ee06f5c8f597a152b780232070df0207c8a1e7 100755 (executable)
@@ -4,6 +4,12 @@ test_description='test git-http-backend respects CONTENT_LENGTH'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping http backend content tests; Perl not available'
+       test_done
+fi
+
 test_lazy_prereq GZIP 'gzip --version'
 
 verify_http_result() {
index d0c18660e33113e64a293c695239a1c1a7975add..d743d986c401a0732fc4d8ae040c934ed4f9f2fe 100755 (executable)
@@ -649,7 +649,7 @@ test_expect_success 'GIT_TRACE_PACKFILE produces a usable pack' '
        git -C replay.git index-pack -v --stdin <tmp.pack
 '
 
-test_expect_success 'clone on case-insensitive fs' '
+test_expect_success PERL_TEST_HELPERS 'clone on case-insensitive fs' '
        git init icasefs &&
        (
                cd icasefs &&
@@ -662,7 +662,7 @@ test_expect_success 'clone on case-insensitive fs' '
        )
 '
 
-test_expect_success CASE_INSENSITIVE_FS 'colliding file detection' '
+test_expect_success PERL_TEST_HELPERS,CASE_INSENSITIVE_FS 'colliding file detection' '
        grep X icasefs/warning &&
        grep x icasefs/warning &&
        test_grep "the following paths have collided" icasefs/warning
index 4650451964339d8e75e571a76d0777447c16647f..bc7e0fec8dcdbb1ab2a6c851f8ae52676c958cc7 100755 (executable)
@@ -751,7 +751,7 @@ replace_packfile () {
        }' >"$HTTPD_ROOT_PATH/one-time-perl"
 }
 
-test_expect_success 'upon cloning, check that all refs point to objects' '
+test_expect_success PERL_TEST_HELPERS 'upon cloning, check that all refs point to objects' '
        SERVER="$HTTPD_DOCUMENT_ROOT_PATH/server" &&
        rm -rf "$SERVER" repo &&
        test_create_repo "$SERVER" &&
@@ -784,7 +784,7 @@ test_expect_success 'upon cloning, check that all refs point to objects' '
        ! test -e "$HTTPD_ROOT_PATH/one-time-perl"
 '
 
-test_expect_success 'when partial cloning, tolerate server not sending target of tag' '
+test_expect_success PERL_TEST_HELPERS 'when partial cloning, tolerate server not sending target of tag' '
        SERVER="$HTTPD_DOCUMENT_ROOT_PATH/server" &&
        rm -rf "$SERVER" repo &&
        test_create_repo "$SERVER" &&
@@ -825,7 +825,7 @@ test_expect_success 'when partial cloning, tolerate server not sending target of
        ! test -e "$HTTPD_ROOT_PATH/one-time-perl"
 '
 
-test_expect_success 'tolerate server sending REF_DELTA against missing promisor objects' '
+test_expect_success PERL_TEST_HELPERS 'tolerate server sending REF_DELTA against missing promisor objects' '
        SERVER="$HTTPD_DOCUMENT_ROOT_PATH/server" &&
        rm -rf "$SERVER" repo &&
        test_create_repo "$SERVER" &&
index 678a346ed06780e389d8d3e4c06bd61c92966d2f..200bf06ecb3b4839b2a11d40b3a18b81ea569e0d 100755 (executable)
@@ -220,7 +220,7 @@ test_expect_success 'refs/heads prefix' '
        test_cmp expect actual
 '
 
-test_expect_success 'ignore very large set of prefixes' '
+test_expect_success PERL_TEST_HELPERS 'ignore very large set of prefixes' '
        # generate a large number of ref-prefixes that we expect
        # to match nothing; the value here exceeds TOO_MANY_PREFIXES
        # from ls-refs.c.
index d3df81e7852d7db2399ddfd7a1e85612f3353087..ad5e772cd725d4df9950463862828a0519e06d93 100755 (executable)
@@ -1120,7 +1120,7 @@ test_expect_success 'push with http:// and a config of v2 does not request v2' '
        ! grep "git< version 2" log
 '
 
-test_expect_success 'when server sends "ready", expect DELIM' '
+test_expect_success PERL_TEST_HELPERS 'when server sends "ready", expect DELIM' '
        rm -rf "$HTTPD_DOCUMENT_ROOT_PATH/http_parent" http_child &&
 
        git init "$HTTPD_DOCUMENT_ROOT_PATH/http_parent" &&
@@ -1140,7 +1140,7 @@ test_expect_success 'when server sends "ready", expect DELIM' '
        test_grep "expected packfile to be sent after .ready." err
 '
 
-test_expect_success 'when server does not send "ready", expect FLUSH' '
+test_expect_success PERL_TEST_HELPERS 'when server does not send "ready", expect FLUSH' '
        rm -rf "$HTTPD_DOCUMENT_ROOT_PATH/http_parent" http_child log &&
 
        git init "$HTTPD_DOCUMENT_ROOT_PATH/http_parent" &&
@@ -1446,7 +1446,7 @@ test_expect_success 'http:// --negotiate-only' '
        grep "$COMMON" out
 '
 
-test_expect_success 'http:// --negotiate-only without wait-for-done support' '
+test_expect_success PERL_TEST_HELPERS 'http:// --negotiate-only without wait-for-done support' '
        SERVER="server" &&
        URI="$HTTPD_URL/one_time_perl/server" &&
 
index 191097171bcbd4d16f107430af4ee4bb4c14493a..f59d47aa6c62a9ed8664aed0fdd03759708f81a7 100755 (executable)
@@ -4,6 +4,12 @@ test_description='upload-pack ref-in-want'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping upload-pack ref-in-want tests; Perl not available'
+       test_done
+fi
+
 get_actual_refs () {
        sed -n -e '/wanted-refs/,/0001/{
                /wanted-refs/d
index d2cc69a17e4668b087d862a6b46e960b7cff0d8d..9a420cf560599e14a489b70fa674ab08292ea16b 100755 (executable)
@@ -4,6 +4,12 @@ test_description='handling of promisor remote advertisement'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping promisor remote capabilities tests; Perl not available'
+       test_done
+fi
+
 GIT_TEST_MULTI_PACK_INDEX=0
 GIT_TEST_MULTI_PACK_INDEX_WRITE_INCREMENTAL=0
 
index daa009c9a1b4b67d510df74f1d5d5cc2b1a904cd..5e1482aff78d2b4cae3e988e939532099b9f032d 100755 (executable)
@@ -7,6 +7,12 @@ test_description='Tests git rev-list --bisect functionality'
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-t6000.sh # t6xxx specific functions
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping rev-list bisect tests; Perl not available'
+       test_done
+fi
+
 # usage: test_bisection max-diff bisect-option head ^prune...
 #
 # e.g. test_bisection 1 --bisect l1 ^l0
index 0d7055d46d46906af535032071c33ac353b54e90..02dd4127aff552454f0a94ddc56e721a50dbddc9 100755 (executable)
@@ -8,6 +8,12 @@ test_description='Tests git rev-list --topo-order functionality'
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-t6000.sh # t6xxx specific functions
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping rev-list topo-order tests; Perl not available'
+       test_done
+fi
+
 list_duplicates()
 {
     "$@" | sort | uniq -d
index bad02cf5b83dbc014c23cc8ac66135e0cf095138..6131c361094141fe8b7aedc333c3fecb8284f691 100755 (executable)
@@ -4,6 +4,12 @@ test_description='git rev-list should notice bad commits'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping rev-list with bad commit tests; Perl not available'
+       test_done
+fi
+
 # Note:
 # - compression level is set to zero to make "corruptions" easier to perform
 # - reflog is disabled to avoid extra references which would twart the test
index 39793cbbd661afe7fe9b9bab2302b023e4ef1d0a..8074185742c170cb20b135d1ab8e3177e3808b1f 100755 (executable)
@@ -26,7 +26,7 @@ test_expect_success 'set up --reverse example' '
        commit five
        '
 
-test_expect_success '--reverse --parents --full-history combines correctly' '
+test_expect_success PERL_TEST_HELPERS '--reverse --parents --full-history combines correctly' '
        git rev-list --parents --full-history main -- foo |
                perl -e "print reverse <>" > expected &&
        git rev-list --reverse --parents --full-history main -- foo \
@@ -34,7 +34,7 @@ test_expect_success '--reverse --parents --full-history combines correctly' '
        test_cmp expected actual
        '
 
-test_expect_success '--boundary does too' '
+test_expect_success PERL_TEST_HELPERS '--boundary does too' '
        git rev-list --boundary --parents --full-history main ^root -- foo |
                perl -e "print reverse <>" > expected &&
        git rev-list --boundary --reverse --parents --full-history \
index 22dfd6d978ef53553c871f0acf47e09106f382eb..eb98b3919c8b646018d9ff8c2257162341654564 100755 (executable)
@@ -4,6 +4,12 @@ test_description='git rev-list should handle unexpected object types'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping rev-list unexpected objects tests; Perl not available'
+       test_done
+fi
+
 test_expect_success 'setup well-formed objects' '
        blob="$(printf "foo" | git hash-object -w --stdin)" &&
        tree="$(printf "100644 blob $blob\tfoo" | git mktree)" &&
index 3385fe9f130762a79fe1c15e3d60b6fbc699b425..6a74be576a295af1aba1065b373e4da88fef062e 100755 (executable)
@@ -4,6 +4,12 @@ test_description='basic tests of rev-list --disk-usage'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping rev-list disk usage tests; Perl not available'
+       test_done
+fi
+
 # we want a mix of reachable and unreachable, as well as
 # objects in the bitmapped pack and some outside of it
 test_expect_success 'set up repository' '
index a5c779438547382a8c263b3d5e35bfd2d93c217c..732a4d3171e21c73f07a87fd4b2f3929f35b7a42 100755 (executable)
@@ -10,6 +10,12 @@ GNUPGHOME_NOT_USED=$GNUPGHOME
 . "$TEST_DIRECTORY"/lib-gpg.sh
 . "$TEST_DIRECTORY"/lib-terminal.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping for-each-ref tests; Perl not available'
+       test_done
+fi
+
 # Mon Jul 3 23:18:43 2006 +0000
 datestamp=1151968723
 setdate_and_increment () {
index 932c26cb45b6e3702063baec6fca02078813c4cd..49aae183829606198ccc4eb8266856eefe154915 100755 (executable)
@@ -661,7 +661,7 @@ test_expect_success 'setup trace2' '
        export GIT_TRACE2_BRIEF
 '
 
-test_expect_success 'setup large log output' '
+test_expect_success PERL_TEST_HELPERS 'setup large log output' '
        perl -e "
                print \"this is a long commit message\" x 50000
        " >commit-msg &&
index 0c605fd271a696a4ef77adadbfaaa8b17582070f..14069600a2fd36939bb4810b835f1f49c86464b9 100755 (executable)
@@ -4,6 +4,12 @@ test_description='check handling of disallowed .gitmodule urls'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping submodule dash URL tests; Perl not available'
+       test_done
+fi
+
 test_expect_success 'setup' '
        git config --global protocol.file.allow always
 '
index b2070d4e39f74d6be473b96efbd2dcdfa097615c..14c41b2cb7cc1dc17a956f88faeb8153c9e6a874 100755 (executable)
@@ -1064,7 +1064,7 @@ test_expect_success 'status -s submodule summary (clean submodule)' '
        test_cmp expect output
 '
 
-test_expect_success 'status -z implies porcelain' '
+test_expect_success PERL_TEST_HELPERS 'status -z implies porcelain' '
        git status --porcelain |
        perl -pe "s/\012/\000/g" >expect &&
        git status -z >output &&
index 90ebb64f46ebfaeed11c0a0d36cf015e415423b9..b2730d200c8583e9ca08af67794dd435ea2fb8ef 100755 (executable)
@@ -4,6 +4,12 @@ test_description='git grep in binary files'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping grep binary tests; Perl not available'
+       test_done
+fi
+
 test_expect_success 'setup' "
        echo 'binaryQfileQm[*]cQ*æQð' | q_to_nul >a &&
        git add a &&
index d7167f55397f57f35a75eccff662c13b4f712ec8..609845aeb1ea1454499d1500fb950db8f6988282 100755 (executable)
@@ -7,6 +7,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 TEST_CREATE_REPO_NO_TEMPLATE=1
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping annotate tests; Perl not available'
+       test_done
+fi
+
 PROG='git annotate'
 . "$TEST_DIRECTORY"/annotate-tests.sh
 
index e98993276a651a0009b837683ace80fad87cc20a..b40199df2313e4efc4292d4099b2cf8ced614090 100755 (executable)
@@ -7,6 +7,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 TEST_CREATE_REPO_NO_TEMPLATE=1
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping blame colors tests; Perl not available'
+       test_done
+fi
+
 PROG='git blame -c'
 . "$TEST_DIRECTORY"/annotate-tests.sh
 
index 07a287ffd3e5c1d05e8e2513d14359022a6da2a3..5cb1687208143cbdbbba92b52c4be9c06481bfcd 100755 (executable)
@@ -4,6 +4,12 @@ test_description='git blame textconv support'
 
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping blame textconv tests; Perl not available'
+       test_done
+fi
+
 find_blame() {
        sed -e 's/^[^(]*//'
 }
index c66494f5ba73357f11644c710e0906da9b40c36a..388057245c827648452e5001b9050f68a1362455 100755 (executable)
@@ -81,7 +81,7 @@ do
                git blame --root -C --$output combined >output
        '
 
-       test_expect_success "$output output finds correct commits" '
+       test_expect_success PERL_TEST_HELPERS "$output output finds correct commits" '
                generate_expect >expect <<-\EOF &&
                5 base
                1 modified
@@ -93,7 +93,7 @@ do
                test_cmp expect actual
        '
 
-       test_expect_success "$output output shows correct filenames" '
+       test_expect_success PERL_TEST_HELPERS "$output output shows correct filenames" '
                generate_expect >expect <<-\EOF &&
                11 one
                11 two
@@ -102,7 +102,7 @@ do
                test_cmp expect actual
        '
 
-       test_expect_success "$output output shows correct previous pointer" '
+       test_expect_success PERL_TEST_HELPERS "$output output shows correct previous pointer" '
                generate_expect >expect <<-EOF &&
                5 NONE
                1 $(git rev-parse modified^) one
index c3a5f6d01ffe5cff12b868e7cbe5a09dacbef011..3d77352650ffb6628f299469a04155cfa90b2ed2 100755 (executable)
@@ -7,6 +7,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 TEST_CREATE_REPO_NO_TEMPLATE=1
 . ./test-lib.sh
 
+if ! test_have_prereq PERL_TEST_HELPERS
+then
+       skip_all='skipping blame colors tests; Perl not available'
+       test_done
+fi
+
 PROG='git blame -c'
 . "$TEST_DIRECTORY"/annotate-tests.sh
 
index 067b15bad2508cc01614f8b1a01aeab7cac916dc..a9d38be997cc770f0698f292791bc3110f0ff785 100755 (executable)
@@ -15,7 +15,7 @@ test_expect_success 'initialize repo' '
        test -e file
        '
 
-test_expect_success '(supposedly) non-conflicting change from SVN' '
+test_expect_success PERL_TEST_HELPERS '(supposedly) non-conflicting change from SVN' '
        test x"$(sed -n -e 58p < file)" = x58 &&
        test x"$(sed -n -e 61p < file)" = x61 &&
        svn_cmd co "$svnrepo" tmp &&
@@ -37,7 +37,7 @@ test_expect_success 'some unrelated changes to git' "
        git commit -m bye-life life
        "
 
-test_expect_success 'change file but in unrelated area' "
+test_expect_success PERL_TEST_HELPERS 'change file but in unrelated area' "
        test x\"\$(sed -n -e 4p < file)\" = x4 &&
        test x\"\$(sed -n -e 7p < file)\" = x7 &&
        perl -i.bak -p -e 's/^4\$/4444/' file &&
index 40427883ec6dbfdd3081e6b308662aced9e25c04..0781a8d6acef6d5174ab9e07d01a15f8c5051cf5 100755 (executable)
@@ -610,7 +610,7 @@ test_expect_success 'directory becomes symlink'        '
        (cd result && git show main:foo)
 '
 
-test_expect_success 'fast-export quotes pathnames' '
+test_expect_success PERL_TEST_HELPERS 'fast-export quotes pathnames' '
        git init crazy-paths &&
        test_config -C crazy-paths core.protectNTFS false &&
        (cd crazy-paths &&
index 36566ace21b07ce4f2a74dc8e828863205a3843b..f619b60f2269ad6c560e3e8bc6ab99e8171e74d8 100755 (executable)
@@ -29,7 +29,7 @@ test_expect_success 'shell allows interactive command' '
        test_cmp expect actual
 '
 
-test_expect_success 'shell complains of overlong commands' '
+test_expect_success PERL_TEST_HELPERS 'shell complains of overlong commands' '
        perl -e "print \"a\" x 2**12 for (0..2**19)" |
        test_must_fail git shell 2>err &&
        grep "too long" err
index a62699d6c79a9b5016e3997754ff60d827725ca3..59162a3c834402a8e9001a4b437ced58b6555228 100644 (file)
@@ -1706,6 +1706,7 @@ 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
+test -n "$PERL_PATH" && test_set_prereq PERL_TEST_HELPERS
 
 if test -z "$GIT_TEST_CHECK_CACHE_TREE"
 then