t: introduce PERL_TEST_HELPERS prerequisite

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>

Patrick Steinhardt committed Apr 3, 2025 at 07:05 UTC 23e21a58d5c7b5ae7b4b5532933e0f82e24024fe
71 files changed +281 -93
t/t0008-ignores.sh
+6
@@ -5,6 +5,12 @@ test_description=check-ignore
5 TEST_CREATE_REPO_NO_TEMPLATE=1
6 . ./test-lib.sh
7
8 +if ! test_have_prereq PERL_TEST_HELPERS
9 +then
10 + skip_all='skipping ignores tests; Perl not available'
11 + test_done
12 +fi
13 +
14 init_vars () {
15 global_excludes="global-excludes"
16 }
t/t0021-conversion.sh
+2 -2
@@ -619,7 +619,7 @@ test_expect_success 'required process filter should be used only for "clean" ope
619 )
620 '
621
622 -test_expect_success 'required process filter should process multiple packets' '
622 +test_expect_success PERL_TEST_HELPERS 'required process filter should process multiple packets' '
623 test_config_global filter.protocol.process "test-tool rot13-filter --log=debug.log clean smudge" &&
624 test_config_global filter.protocol.required true &&
625
@@ -684,7 +684,7 @@ test_expect_success 'required process filter should process multiple packets' '
684 )
685 '
686
687 -test_expect_success 'required process filter with clean error should fail' '
687 +test_expect_success PERL_TEST_HELPERS 'required process filter with clean error should fail' '
688 test_config_global filter.protocol.process "test-tool rot13-filter --log=debug.log clean smudge" &&
689 test_config_global filter.protocol.required true &&
690 rm -rf repo &&
t/t0210-trace2-normal.sh
+6
@@ -4,6 +4,12 @@ test_description='test trace2 facility (normal target)'
4
5 . ./test-lib.sh
6
7 +if ! test_have_prereq PERL_TEST_HELPERS
8 +then
9 + skip_all='skipping trace2 tests; Perl not available'
10 + test_done
11 +fi
12 +
13 # Turn off any inherited trace2 settings for this test.
14 sane_unset GIT_TRACE2 GIT_TRACE2_PERF GIT_TRACE2_EVENT
15 sane_unset GIT_TRACE2_BRIEF
t/t0211-trace2-perf.sh
+6
@@ -4,6 +4,12 @@ test_description='test trace2 facility (perf target)'
4
5 . ./test-lib.sh
6
7 +if ! test_have_prereq PERL_TEST_HELPERS
8 +then
9 + skip_all='skipping trace2 tests; Perl not available'
10 + test_done
11 +fi
12 +
13 # Turn off any inherited trace2 settings for this test.
14 sane_unset GIT_TRACE2 GIT_TRACE2_PERF GIT_TRACE2_EVENT
15 sane_unset GIT_TRACE2_PERF_BRIEF
t/t0610-reftable-basics.sh
+1 -1
@@ -643,7 +643,7 @@ test_expect_success 'basic: commit and list refs' '
643 test_cmp actual expect
644 '
645
646 -test_expect_success 'basic: can write large commit message' '
646 +test_expect_success PERL_TEST_HELPERS 'basic: can write large commit message' '
647 test_when_finished "rm -rf repo" &&
648 git init repo &&
649 perl -e "
t/t0613-reftable-write-options.sh
+1 -1
@@ -139,7 +139,7 @@ test_expect_success 'small block size leads to multiple ref blocks' '
139 )
140 '
141
142 -test_expect_success 'small block size fails with large reflog message' '
142 +test_expect_success PERL_TEST_HELPERS 'small block size fails with large reflog message' '
143 test_when_finished "rm -rf repo" &&
144 git init repo &&
145 (
t/t1006-cat-file.sh
+1 -1
@@ -1270,7 +1270,7 @@ extract_batch_output () {
1270 ' "$@"
1271 }
1272
1273 -test_expect_success 'cat-file --batch-all-objects --batch ignores replace' '
1273 +test_expect_success PERL_TEST_HELPERS 'cat-file --batch-all-objects --batch ignores replace' '
1274 git cat-file --batch-all-objects --batch >actual.raw &&
1275 extract_batch_output $orig <actual.raw >actual &&
1276 {
t/t1007-hash-object.sh
+3 -3
@@ -205,7 +205,7 @@ test_expect_success 'too-short tree' '
205 grep "too-short tree object" err
206 '
207
208 -test_expect_success 'malformed mode in tree' '
208 +test_expect_success PERL_TEST_HELPERS 'malformed mode in tree' '
209 hex_oid=$(echo foo | git hash-object --stdin -w) &&
210 bin_oid=$(echo $hex_oid | hex2oct) &&
211 printf "9100644 \0$bin_oid" >tree-with-malformed-mode &&
@@ -213,7 +213,7 @@ test_expect_success 'malformed mode in tree' '
213 grep "malformed mode in tree entry" err
214 '
215
216 -test_expect_success 'empty filename in tree' '
216 +test_expect_success PERL_TEST_HELPERS 'empty filename in tree' '
217 hex_oid=$(echo foo | git hash-object --stdin -w) &&
218 bin_oid=$(echo $hex_oid | hex2oct) &&
219 printf "100644 \0$bin_oid" >tree-with-empty-filename &&
@@ -221,7 +221,7 @@ test_expect_success 'empty filename in tree' '
221 grep "empty filename in tree entry" err
222 '
223
224 -test_expect_success 'duplicate filename in tree' '
224 +test_expect_success PERL_TEST_HELPERS 'duplicate filename in tree' '
225 hex_oid=$(echo foo | git hash-object --stdin -w) &&
226 bin_oid=$(echo $hex_oid | hex2oct) &&
227 {
t/t1010-mktree.sh
+2 -2
@@ -41,13 +41,13 @@ test_expect_success 'ls-tree piped to mktree (2)' '
41 test_cmp tree.withsub actual
42 '
43
44 -test_expect_success 'ls-tree output in wrong order given to mktree (1)' '
44 +test_expect_success PERL_TEST_HELPERS 'ls-tree output in wrong order given to mktree (1)' '
45 perl -e "print reverse <>" <top |
46 git mktree >actual &&
47 test_cmp tree actual
48 '
49
50 -test_expect_success 'ls-tree output in wrong order given to mktree (2)' '
50 +test_expect_success PERL_TEST_HELPERS 'ls-tree output in wrong order given to mktree (2)' '
51 perl -e "print reverse <>" <top.withsub |
52 git mktree >actual &&
53 test_cmp tree.withsub actual
t/t1450-fsck.sh
+3 -3
@@ -346,7 +346,7 @@ test_expect_success 'unparseable tree object' '
346 test_grep ! "fatal: empty filename in tree entry" out
347 '
348
349 -test_expect_success 'tree entry with type mismatch' '
349 +test_expect_success PERL_TEST_HELPERS 'tree entry with type mismatch' '
350 test_when_finished "remove_object \$blob" &&
351 test_when_finished "remove_object \$tree" &&
352 test_when_finished "remove_object \$commit" &&
@@ -364,7 +364,7 @@ test_expect_success 'tree entry with type mismatch' '
364 test_grep ! "dangling blob" out
365 '
366
367 -test_expect_success 'tree entry with bogus mode' '
367 +test_expect_success PERL_TEST_HELPERS 'tree entry with bogus mode' '
368 test_when_finished "remove_object \$blob" &&
369 test_when_finished "remove_object \$tree" &&
370 blob=$(echo blob | git hash-object -w --stdin) &&
@@ -984,7 +984,7 @@ corrupt_index_checksum () {
984
985 # Corrupt the checksum on the index and then
986 # verify that only fsck notices.
987 -test_expect_success 'detect corrupt index file in fsck' '
987 +test_expect_success PERL_TEST_HELPERS 'detect corrupt index file in fsck' '
988 cp .git/index .git/index.backup &&
989 test_when_finished "mv .git/index.backup .git/index" &&
990 corrupt_index_checksum &&
t/t3300-funny-names.sh
+3 -3
@@ -63,7 +63,7 @@ test_expect_success 'ls-files quotes funny filename' '
63 test_cmp expected current
64 '
65
66 -test_expect_success 'ls-files -z does not quote funny filename' '
66 +test_expect_success PERL_TEST_HELPERS 'ls-files -z does not quote funny filename' '
67 cat >expected <<-\EOF &&
68 just space
69 no-funny
@@ -101,7 +101,7 @@ test_expect_success 'diff-tree --name-status quotes funny filename' '
101 test_cmp expected current
102 '
103
104 -test_expect_success 'diff-index -z does not quote funny filename' '
104 +test_expect_success PERL_TEST_HELPERS 'diff-index -z does not quote funny filename' '
105 cat >expected <<-\EOF &&
106 A
107 tabs ," (dq) and spaces
@@ -111,7 +111,7 @@ test_expect_success 'diff-index -z does not quote funny filename' '
111 test_cmp expected current
112 '
113
114 -test_expect_success 'diff-tree -z does not quote funny filename' '
114 +test_expect_success PERL_TEST_HELPERS 'diff-tree -z does not quote funny filename' '
115 cat >expected <<-\EOF &&
116 A
117 tabs ," (dq) and spaces
t/t4013-diff-various.sh
+6
@@ -11,6 +11,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
11 . ./test-lib.sh
12 . "$TEST_DIRECTORY"/lib-diff.sh
13
14 +if ! test_have_prereq PERL_TEST_HELPERS
15 +then
16 + skip_all='skipping diff various tests; Perl not available'
17 + test_done
18 +fi
19 +
20 test_expect_success setup '
21
22 GIT_AUTHOR_DATE="2006-06-26 00:00:00 +0000" &&
t/t4014-format-patch.sh
+15 -15
@@ -448,7 +448,7 @@ cat >>expect.no-threading <<EOF
448 ---
449 EOF
450
451 -test_expect_success 'no threading' '
451 +test_expect_success PERL_TEST_HELPERS 'no threading' '
452 git checkout side &&
453 check_threading expect.no-threading main
454 '
@@ -466,11 +466,11 @@ In-Reply-To: <0>
466 References: <0>
467 EOF
468
469 -test_expect_success 'thread' '
469 +test_expect_success PERL_TEST_HELPERS 'thread' '
470 check_threading expect.thread --thread main
471 '
472
473 -test_expect_success '--thread overrides format.thread=deep' '
473 +test_expect_success PERL_TEST_HELPERS '--thread overrides format.thread=deep' '
474 test_config format.thread deep &&
475 check_threading expect.thread --thread main
476 '
@@ -490,7 +490,7 @@ In-Reply-To: <1>
490 References: <1>
491 EOF
492
493 -test_expect_success 'thread in-reply-to' '
493 +test_expect_success PERL_TEST_HELPERS 'thread in-reply-to' '
494 check_threading expect.in-reply-to --in-reply-to="<test.message>" \
495 --thread main
496 '
@@ -512,7 +512,7 @@ In-Reply-To: <0>
512 References: <0>
513 EOF
514
515 -test_expect_success 'thread cover-letter' '
515 +test_expect_success PERL_TEST_HELPERS 'thread cover-letter' '
516 check_threading expect.cover-letter --cover-letter --thread main
517 '
518
@@ -538,12 +538,12 @@ References: <1>
538 <0>
539 EOF
540
541 -test_expect_success 'thread cover-letter in-reply-to' '
541 +test_expect_success PERL_TEST_HELPERS 'thread cover-letter in-reply-to' '
542 check_threading expect.cl-irt --cover-letter \
543 --in-reply-to="<test.message>" --thread main
544 '
545
546 -test_expect_success 'thread explicit shallow' '
546 +test_expect_success PERL_TEST_HELPERS 'thread explicit shallow' '
547 check_threading expect.cl-irt --cover-letter \
548 --in-reply-to="<test.message>" --thread=shallow main
549 '
@@ -562,7 +562,7 @@ References: <0>
562 <1>
563 EOF
564
565 -test_expect_success 'thread deep' '
565 +test_expect_success PERL_TEST_HELPERS 'thread deep' '
566 check_threading expect.deep --thread=deep main
567 '
568
@@ -584,7 +584,7 @@ References: <1>
584 <2>
585 EOF
586
587 -test_expect_success 'thread deep in-reply-to' '
587 +test_expect_success PERL_TEST_HELPERS 'thread deep in-reply-to' '
588 check_threading expect.deep-irt --thread=deep \
589 --in-reply-to="<test.message>" main
590 '
@@ -609,7 +609,7 @@ References: <0>
609 <2>
610 EOF
611
612 -test_expect_success 'thread deep cover-letter' '
612 +test_expect_success PERL_TEST_HELPERS 'thread deep cover-letter' '
613 check_threading expect.deep-cl --cover-letter --thread=deep main
614 '
615
@@ -638,27 +638,27 @@ References: <1>
638 <3>
639 EOF
640
641 -test_expect_success 'thread deep cover-letter in-reply-to' '
641 +test_expect_success PERL_TEST_HELPERS 'thread deep cover-letter in-reply-to' '
642 check_threading expect.deep-cl-irt --cover-letter \
643 --in-reply-to="<test.message>" --thread=deep main
644 '
645
646 -test_expect_success 'thread via config' '
646 +test_expect_success PERL_TEST_HELPERS 'thread via config' '
647 test_config format.thread true &&
648 check_threading expect.thread main
649 '
650
651 -test_expect_success 'thread deep via config' '
651 +test_expect_success PERL_TEST_HELPERS 'thread deep via config' '
652 test_config format.thread deep &&
653 check_threading expect.deep main
654 '
655
656 -test_expect_success 'thread config + override' '
656 +test_expect_success PERL_TEST_HELPERS 'thread config + override' '
657 test_config format.thread deep &&
658 check_threading expect.thread --thread main
659 '
660
661 -test_expect_success 'thread config + --no-thread' '
661 +test_expect_success PERL_TEST_HELPERS 'thread config + --no-thread' '
662 test_config format.thread deep &&
663 check_threading expect.no-threading --no-thread main
664 '
t/t4020-diff-external.sh
+2 -2
@@ -239,7 +239,7 @@ check_external_diff 128 empty error 2 on --quiet
239
240 echo NULZbetweenZwords | perl -pe 'y/Z/\000/' > file
241
242 -test_expect_success 'force diff with "diff"' '
242 +test_expect_success PERL_TEST_HELPERS 'force diff with "diff"' '
243 after=$(git hash-object file) &&
244 after=$(git rev-parse --short $after) &&
245 echo >.gitattributes "file diff" &&
@@ -300,7 +300,7 @@ test_expect_success 'external diff with autocrlf = true' '
300 test $(wc -l <crlfed.txt) = $(keep_only_cr <crlfed.txt | wc -c)
301 '
302
303 -test_expect_success 'diff --cached' '
303 +test_expect_success PERL_TEST_HELPERS 'diff --cached' '
304 test_config core.autocrlf true &&
305 git add file &&
306 git update-index --assume-unchanged file &&
t/t4029-diff-trailing-space.sh
+1 -1
@@ -18,7 +18,7 @@ index 5f6a263..8cb8bae 100644
18 EOF
19 exit 1
20
21 -test_expect_success "$test_description" '
21 +test_expect_success PERL_TEST_HELPERS "$test_description" '
22 printf "\nx\n" > f &&
23 before=$(git hash-object f) &&
24 before=$(git rev-parse --short $before) &&
t/t4030-diff-textconv.sh
+6
@@ -4,6 +4,12 @@ test_description='diff.*.textconv tests'
4
5 . ./test-lib.sh
6
7 +if ! test_have_prereq PERL_TEST_HELPERS
8 +then
9 + skip_all='skipping diff textconv tests; Perl not available'
10 + test_done
11 +fi
12 +
13 find_diff() {
14 sed '1,/^index /d' | sed '/^-- $/,$d'
15 }
t/t4031-diff-rewrite-binary.sh
+1 -1
@@ -70,7 +70,7 @@ test_expect_success 'setup textconv' '
70 git config diff.foo.textconv "\"$(pwd)\""/dump
71 '
72
73 -test_expect_success 'rewrite diff respects textconv' '
73 +test_expect_success PERL_TEST_HELPERS 'rewrite diff respects textconv' '
74 git diff -B >diff &&
75 grep "dissimilarity index" diff &&
76 grep "^-61" diff &&
t/t4058-diff-duplicates.sh
+6
@@ -13,6 +13,12 @@ test_description='test tree diff when trees have duplicate entries'
13
14 . ./test-lib.sh
15
16 +if ! test_have_prereq PERL_TEST_HELPERS
17 +then
18 + skip_all='skipping diff duplicates tests; Perl not available'
19 + test_done
20 +fi
21 +
22 # make_tree_entry <mode> <mode> <sha1>
23 #
24 # We have to rely on perl here because not all printfs understand
t/t4103-apply-binary.sh
+6
@@ -11,6 +11,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
11
12 . ./test-lib.sh
13
14 +if ! test_have_prereq PERL_TEST_HELPERS
15 +then
16 + skip_all='skipping apply-binary tests; Perl not available'
17 + test_done
18 +fi
19 +
20 test_expect_success 'setup' '
21 cat >file1 <<-\EOF &&
22 A quick brown fox jumps over the lazy dog.
t/t4116-apply-reverse.sh
+6
@@ -10,6 +10,12 @@ test_description='git apply in reverse
10
11 . ./test-lib.sh
12
13 +if ! test_have_prereq PERL_TEST_HELPERS
14 +then
15 + skip_all='skipping apply reverse tests; Perl not available'
16 + test_done
17 +fi
18 +
19 test_expect_success setup '
20
21 test_write_lines a b c d e f g h i j k l m n >file1 &&
t/t4150-am.sh
+1 -1
@@ -1073,7 +1073,7 @@ test_expect_success 'am --patch-format=mboxrd handles mboxrd' '
1073 test_cmp msg out
1074 '
1075
1076 -test_expect_success 'am works with multi-line in-body headers' '
1076 +test_expect_success PERL_TEST_HELPERS 'am works with multi-line in-body headers' '
1077 FORTY="String that has a length of more than forty characters" &&
1078 LONG="$FORTY $FORTY" &&
1079 rm -fr .git/rebase-apply &&
t/t4200-rerere.sh
+6
@@ -27,6 +27,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
27
28 . ./test-lib.sh
29
30 +if ! test_have_prereq PERL_TEST_HELPERS
31 +then
32 + skip_all='skipping rerere tests; Perl not available'
33 + test_done
34 +fi
35 +
36 test_expect_success 'setup' '
37 cat >a1 <<-\EOF &&
38 Some title
t/t4205-log-pretty-formats.sh
+3 -3
@@ -698,7 +698,7 @@ test_expect_success '%(trailers:only=no,only=true) shows only "key: value" trail
698 test_cmp expect actual
699 '
700
701 -test_expect_success '%(trailers:unfold) unfolds trailers' '
701 +test_expect_success PERL_TEST_HELPERS '%(trailers:unfold) unfolds trailers' '
702 git log --no-walk --pretty="%(trailers:unfold)" >actual &&
703 {
704 unfold <trailers &&
@@ -707,7 +707,7 @@ test_expect_success '%(trailers:unfold) unfolds trailers' '
707 test_cmp expect actual
708 '
709
710 -test_expect_success ':only and :unfold work together' '
710 +test_expect_success PERL_TEST_HELPERS ':only and :unfold work together' '
711 git log --no-walk --pretty="%(trailers:only,unfold)" >actual &&
712 git log --no-walk --pretty="%(trailers:unfold,only)" >reverse &&
713 test_cmp actual reverse &&
@@ -754,7 +754,7 @@ test_expect_success '%(trailers:key=foo) handles multiple lines even if folded'
754 test_cmp expect actual
755 '
756
757 -test_expect_success '%(trailers:key=foo,unfold) properly unfolds' '
757 +test_expect_success PERL_TEST_HELPERS '%(trailers:key=foo,unfold) properly unfolds' '
758 git log --no-walk --pretty="format:%(trailers:key=Signed-Off-by,unfold)" >actual &&
759 unfold <trailers | grep Signed-off-by >expect &&
760 test_cmp expect actual
t/t4216-log-bloom.sh
+4 -4
@@ -738,20 +738,20 @@ check_corrupt_graph () {
738 test_cmp expect.out out
739 }
740
741 -test_expect_success 'Bloom reader notices too-small data chunk' '
741 +test_expect_success PERL_TEST_HELPERS 'Bloom reader notices too-small data chunk' '
742 check_corrupt_graph BDAT clear 00000000 &&
743 echo "warning: ignoring too-small changed-path chunk" \
744 "(4 < 12) in commit-graph file" >expect.err &&
745 test_cmp expect.err err
746 '
747
748 -test_expect_success 'Bloom reader notices out-of-bounds filter offsets' '
748 +test_expect_success PERL_TEST_HELPERS 'Bloom reader notices out-of-bounds filter offsets' '
749 check_corrupt_graph BIDX 12 FFFFFFFF &&
750 # use grep to avoid depending on exact chunk size
751 grep "warning: ignoring out-of-range offset (4294967295) for changed-path filter at pos 3 of .git/objects/info/commit-graph" err
752 '
753
754 -test_expect_success 'Bloom reader notices too-small index chunk' '
754 +test_expect_success PERL_TEST_HELPERS 'Bloom reader notices too-small index chunk' '
755 # replace the index with a single entry, making most
756 # lookups out-of-bounds
757 check_corrupt_graph BIDX clear 00000000 &&
@@ -760,7 +760,7 @@ test_expect_success 'Bloom reader notices too-small index chunk' '
760 test_cmp expect.err err
761 '
762
763 -test_expect_success 'Bloom reader notices out-of-order index offsets' '
763 +test_expect_success PERL_TEST_HELPERS 'Bloom reader notices out-of-order index offsets' '
764 # we do not know any real offsets, but we can pick
765 # something plausible; we should not get to the point of
766 # actually reading from the bogus offsets anyway.
t/t5004-archive-corner-cases.sh
+6
@@ -4,6 +4,12 @@ test_description='test corner cases of git-archive'
4
5 . ./test-lib.sh
6
7 +if ! test_have_prereq PERL_TEST_HELPERS
8 +then
9 + skip_all='skipping archive corner cases tests; Perl not available'
10 + test_done
11 +fi
12 +
13 # the 10knuls.tar file is used to test for an empty git generated tar
14 # without having to invoke tar because an otherwise valid empty GNU tar
15 # will be considered broken by {Open,Net}BSD tar
t/t5300-pack-object.sh
+6
@@ -7,6 +7,12 @@ test_description='git pack-object'
7
8 . ./test-lib.sh
9
10 +if ! test_have_prereq PERL_TEST_HELPERS
11 +then
12 + skip_all='skipping pack-object tests; Perl not available'
13 + test_done
14 +fi
15 +
16 test_expect_success 'setup' '
17 rm -f .git/index* &&
18 perl -e "print \"a\" x 4096;" >a &&
t/t5303-pack-corruption-resilience.sh
+2 -2
@@ -99,7 +99,7 @@ test_expect_success '... and loose copy of first delta allows for partial recove
99 git cat-file blob $blob_3 > /dev/null
100 '
101
102 -test_expect_success 'create corruption in data of first object' '
102 +test_expect_success PERL_TEST_HELPERS 'create corruption in data of first object' '
103 create_new_pack &&
104 git prune-packed &&
105 chmod +w ${pack}.pack &&
@@ -156,7 +156,7 @@ test_expect_success '... and then a repack "clears" the corruption' '
156 git cat-file blob $blob_3 > /dev/null
157 '
158
159 -test_expect_success 'create corruption in data of first delta' '
159 +test_expect_success PERL_TEST_HELPERS 'create corruption in data of first delta' '
160 create_new_pack &&
161 git prune-packed &&
162 chmod +w ${pack}.pack &&
t/t5310-pack-bitmaps.sh
+1 -1
@@ -395,7 +395,7 @@ test_bitmap_cases () {
395 )
396 '
397
398 - test_expect_success 'pack.preferBitmapTips' '
398 + test_expect_success PERL_TEST_HELPERS 'pack.preferBitmapTips' '
399 git init repo &&
400 test_when_finished "rm -fr repo" &&
401 (
t/t5316-pack-delta-depth.sh
+4 -4
@@ -87,7 +87,7 @@ max_chain() {
87 # packing heuristics. We double-check that our test case
88 # actually produces a long chain. If it doesn't, it should be
89 # adjusted (or scrapped if the heuristics have become too unreliable)
90 -test_expect_success 'packing produces a long delta' '
90 +test_expect_success PERL_TEST_HELPERS 'packing produces a long delta' '
91 # Use --window=0 to make sure we are seeing reused deltas,
92 # not computing a new long chain.
93 pack=$(git pack-objects --all --window=0 </dev/null pack) &&
@@ -96,21 +96,21 @@ test_expect_success 'packing produces a long delta' '
96 test_cmp expect actual
97 '
98
99 -test_expect_success '--depth limits depth' '
99 +test_expect_success PERL_TEST_HELPERS '--depth limits depth' '
100 pack=$(git pack-objects --all --depth=5 </dev/null pack) &&
101 echo 5 >expect &&
102 max_chain pack-$pack.pack >actual &&
103 test_cmp expect actual
104 '
105
106 -test_expect_success '--depth=0 disables deltas' '
106 +test_expect_success PERL_TEST_HELPERS '--depth=0 disables deltas' '
107 pack=$(git pack-objects --all --depth=0 </dev/null pack) &&
108 echo 0 >expect &&
109 max_chain pack-$pack.pack >actual &&
110 test_cmp expect actual
111 '
112
113 -test_expect_success 'negative depth disables deltas' '
113 +test_expect_success PERL_TEST_HELPERS 'negative depth disables deltas' '
114 pack=$(git pack-objects --all --depth=-1 </dev/null pack) &&
115 echo 0 >expect &&
116 max_chain pack-$pack.pack >actual &&
t/t5318-commit-graph.sh
+6 -6
@@ -837,7 +837,7 @@ check_corrupt_chunk () {
837 test_cmp expect.out out
838 }
839
840 -test_expect_success 'reader notices too-small oid fanout chunk' '
840 +test_expect_success PERL_TEST_HELPERS 'reader notices too-small oid fanout chunk' '
841 # make it big enough that the graph file is plausible,
842 # otherwise we hit an earlier check
843 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' '
848 test_cmp expect.err err
849 '
850
851 -test_expect_success 'reader notices fanout/lookup table mismatch' '
851 +test_expect_success PERL_TEST_HELPERS 'reader notices fanout/lookup table mismatch' '
852 check_corrupt_chunk OIDF 1020 "FFFFFFFF" &&
853 cat >expect.err <<-\EOF &&
854 error: commit-graph OID lookup chunk is the wrong size
@@ -857,7 +857,7 @@ test_expect_success 'reader notices fanout/lookup table mismatch' '
857 test_cmp expect.err err
858 '
859
860 -test_expect_success 'reader notices out-of-bounds fanout' '
860 +test_expect_success PERL_TEST_HELPERS 'reader notices out-of-bounds fanout' '
861 # Rather than try to corrupt a specific hash, we will just
862 # wreck them all. But we cannot just set them all to 0xFFFFFFFF or
863 # 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' '
873 test_cmp expect.err err
874 '
875
876 -test_expect_success 'reader notices too-small commit data chunk' '
876 +test_expect_success PERL_TEST_HELPERS 'reader notices too-small commit data chunk' '
877 check_corrupt_chunk CDAT clear 00000000 &&
878 cat >expect.err <<-\EOF &&
879 error: commit-graph commit data chunk is wrong size
@@ -882,7 +882,7 @@ test_expect_success 'reader notices too-small commit data chunk' '
882 test_cmp expect.err err
883 '
884
885 -test_expect_success 'reader notices out-of-bounds extra edge' '
885 +test_expect_success PERL_TEST_HELPERS 'reader notices out-of-bounds extra edge' '
886 check_corrupt_chunk EDGE clear &&
887 cat >expect.err <<-\EOF &&
888 error: commit-graph extra-edges pointer out of bounds
@@ -890,7 +890,7 @@ test_expect_success 'reader notices out-of-bounds extra edge' '
890 test_cmp expect.err err
891 '
892
893 -test_expect_success 'reader notices too-small generations chunk' '
893 +test_expect_success PERL_TEST_HELPERS 'reader notices too-small generations chunk' '
894 check_corrupt_chunk GDA2 clear 00000000 &&
895 cat >expect.err <<-\EOF &&
896 error: commit-graph generations chunk is wrong size
t/t5319-multi-pack-index.sh
+8 -8
@@ -1120,7 +1120,7 @@ corrupt_chunk () {
1120 corrupt_chunk_file $midx "$@"
1121 }
1122
1123 -test_expect_success 'reader notices too-small oid fanout chunk' '
1123 +test_expect_success PERL_TEST_HELPERS 'reader notices too-small oid fanout chunk' '
1124 corrupt_chunk OIDF clear 00000000 &&
1125 test_must_fail git log 2>err &&
1126 cat >expect <<-\EOF &&
@@ -1130,7 +1130,7 @@ test_expect_success 'reader notices too-small oid fanout chunk' '
1130 test_cmp expect err
1131 '
1132
1133 -test_expect_success 'reader notices too-small oid lookup chunk' '
1133 +test_expect_success PERL_TEST_HELPERS 'reader notices too-small oid lookup chunk' '
1134 corrupt_chunk OIDL clear 00000000 &&
1135 test_must_fail git log 2>err &&
1136 cat >expect <<-\EOF &&
@@ -1140,7 +1140,7 @@ test_expect_success 'reader notices too-small oid lookup chunk' '
1140 test_cmp expect err
1141 '
1142
1143 -test_expect_success 'reader notices too-small pack names chunk' '
1143 +test_expect_success PERL_TEST_HELPERS 'reader notices too-small pack names chunk' '
1144 # There is no NUL to terminate the name here, so the
1145 # chunk is too short.
1146 corrupt_chunk PNAM clear 70656666 &&
@@ -1151,7 +1151,7 @@ test_expect_success 'reader notices too-small pack names chunk' '
1151 test_cmp expect err
1152 '
1153
1154 -test_expect_success 'reader handles unaligned chunks' '
1154 +test_expect_success PERL_TEST_HELPERS 'reader handles unaligned chunks' '
1155 # A 9-byte PNAM means all of the subsequent chunks
1156 # will no longer be 4-byte aligned, but it is still
1157 # a valid one-pack chunk on its own (it is "foo.pack\0").
@@ -1165,7 +1165,7 @@ test_expect_success 'reader handles unaligned chunks' '
1165 test_cmp expect.err err
1166 '
1167
1168 -test_expect_success 'reader notices too-small object offset chunk' '
1168 +test_expect_success PERL_TEST_HELPERS 'reader notices too-small object offset chunk' '
1169 corrupt_chunk OOFF clear 00000000 &&
1170 test_must_fail git log 2>err &&
1171 cat >expect <<-\EOF &&
@@ -1175,7 +1175,7 @@ test_expect_success 'reader notices too-small object offset chunk' '
1175 test_cmp expect err
1176 '
1177
1178 -test_expect_success 'reader bounds-checks large offset table' '
1178 +test_expect_success PERL_TEST_HELPERS 'reader bounds-checks large offset table' '
1179 # re-use the objects64 dir here to cheaply get access to a midx
1180 # with large offsets.
1181 git init repo &&
@@ -1197,7 +1197,7 @@ test_expect_success 'reader bounds-checks large offset table' '
1197 )
1198 '
1199
1200 -test_expect_success 'reader notices too-small revindex chunk' '
1200 +test_expect_success PERL_TEST_HELPERS 'reader notices too-small revindex chunk' '
1201 # We only get a revindex with bitmaps (and likewise only
1202 # load it when they are asked for).
1203 test_config repack.writeBitmaps true &&
@@ -1214,7 +1214,7 @@ test_expect_success 'reader notices too-small revindex chunk' '
1214 test_cmp expect.err err
1215 '
1216
1217 -test_expect_success 'reader notices out-of-bounds fanout' '
1217 +test_expect_success PERL_TEST_HELPERS 'reader notices out-of-bounds fanout' '
1218 # This is similar to the out-of-bounds fanout test in t5318. The values
1219 # in adjacent entries should be large but not identical (they
1220 # are used as hi/lo starts for a binary search, which would then abort
t/t5324-split-commit-graph.sh
+1 -1
@@ -401,7 +401,7 @@ test_expect_success 'verify across alternates' '
401 )
402 '
403
404 -test_expect_success 'reader bounds-checks base-graph chunk' '
404 +test_expect_success PERL_TEST_HELPERS 'reader bounds-checks base-graph chunk' '
405 git clone --no-hardlinks . corrupt-base-chunk &&
406 (
407 cd corrupt-base-chunk &&
t/t5326-multi-pack-bitmaps.sh
+1 -1
@@ -153,7 +153,7 @@ test_midx_bitmap_cases () {
153 )
154 '
155
156 - test_expect_success 'pack.preferBitmapTips' '
156 + test_expect_success PERL_TEST_HELPERS 'pack.preferBitmapTips' '
157 git init repo &&
158 test_when_finished "rm -fr repo" &&
159 (
t/t5328-commit-graph-64bit-time.sh
+1 -1
@@ -74,7 +74,7 @@ test_expect_success 'single commit with generation data exceeding UINT32_MAX' '
74 git -C repo-uint32-max commit-graph verify
75 '
76
77 -test_expect_success 'reader notices out-of-bounds generation overflow' '
77 +test_expect_success PERL_TEST_HELPERS 'reader notices out-of-bounds generation overflow' '
78 graph=.git/objects/info/commit-graph &&
79 test_when_finished "rm -rf $graph" &&
80 git commit-graph write --reachable &&
t/t5333-pseudo-merge-bitmaps.sh
+6
@@ -6,6 +6,12 @@ GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP=0
6
7 . ./test-lib.sh
8
9 +if ! test_have_prereq PERL_TEST_HELPERS
10 +then
11 + skip_all='skipping pseudo-merge bitmap tests; Perl not available'
12 + test_done
13 +fi
14 +
15 test_pseudo_merges () {
16 test-tool bitmap dump-pseudo-merges
17 }
t/t5400-send-pack.sh
+1 -1
@@ -268,7 +268,7 @@ extract_ref_advertisement () {
268 '
269 }
270
271 -test_expect_success 'receive-pack de-dupes .have lines' '
271 +test_expect_success PERL_TEST_HELPERS 'receive-pack de-dupes .have lines' '
272 git init shared &&
273 git -C shared commit --allow-empty -m both &&
274 git clone -s shared fork &&
t/t5410-receive-pack-alternates.sh
+2 -2
@@ -20,7 +20,7 @@ extract_haves () {
20 depacketize | perl -lne '/^(\S+) \.have/ and print $1'
21 }
22
23 -test_expect_success 'with core.alternateRefsCommand' '
23 +test_expect_success PERL_TEST_HELPERS 'with core.alternateRefsCommand' '
24 write_script fork/alternate-refs <<-\EOF &&
25 git --git-dir="$1" for-each-ref \
26 --format="%(objectname)" \
@@ -33,7 +33,7 @@ test_expect_success 'with core.alternateRefsCommand' '
33 test_cmp expect actual.haves
34 '
35
36 -test_expect_success 'with core.alternateRefsPrefixes' '
36 +test_expect_success PERL_TEST_HELPERS 'with core.alternateRefsPrefixes' '
37 test_config -C fork core.alternateRefsPrefixes "refs/heads/private" &&
38 git rev-parse private/branch >expect &&
39 printf "0000" | git receive-pack fork >actual &&
t/t5503-tagfollow.sh
+6
@@ -7,6 +7,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8 . ./test-lib.sh
9
10 +if ! test_have_prereq PERL_TEST_HELPERS
11 +then
12 + skip_all='skipping tagfollow tests; Perl not available'
13 + test_done
14 +fi
15 +
16 # End state of the repository:
17 #
18 # T - tag1 S - tag2
t/t5504-fetch-receive-strict.sh
+1 -1
@@ -359,7 +359,7 @@ test_expect_success \
359 grep "Cannot demote unterminatedheader" act
360 '
361
362 -test_expect_success 'badFilemode is not a strict error' '
362 +test_expect_success PERL_TEST_HELPERS 'badFilemode is not a strict error' '
363 git init --bare badmode.git &&
364 tree=$(
365 cd badmode.git &&
t/t5510-fetch.sh
+6
@@ -8,6 +8,12 @@ test_description='Per branch config variables affects "git fetch".
8 . ./test-lib.sh
9 . "$TEST_DIRECTORY"/lib-bundle.sh
10
11 +if ! test_have_prereq PERL_TEST_HELPERS
12 +then
13 + skip_all='skipping fetch tests; Perl not available'
14 + test_done
15 +fi
16 +
17 D=$(pwd)
18
19 test_expect_success setup '
t/t5532-fetch-proxy.sh
+6
@@ -4,6 +4,12 @@ test_description='fetching via git:// using core.gitproxy'
4
5 . ./test-lib.sh
6
7 +if ! test_have_prereq PERL_TEST_HELPERS
8 +then
9 + skip_all='skipping fetch proxy tests; Perl not available'
10 + test_done
11 +fi
12 +
13 test_expect_success 'setup remote repo' '
14 git init remote &&
15 (cd remote &&
t/t5534-push-signed.sh
+1 -1
@@ -177,7 +177,7 @@ test_expect_success GPGSSH 'ssh signed push sends push certificate' '
177 test_cmp expect dst/push-cert-status
178 '
179
180 -test_expect_success GPG 'inconsistent push options in signed push not allowed' '
180 +test_expect_success GPG,PERL_TEST_HELPERS 'inconsistent push options in signed push not allowed' '
181 # First, invoke receive-pack with dummy input to obtain its preamble.
182 prepare_dst &&
183 git -C dst config receive.certnonceseed sekrit &&
t/t5537-fetch-shallow.sh
+1 -1
@@ -256,7 +256,7 @@ start_httpd
256
257 REPO="$HTTPD_DOCUMENT_ROOT_PATH/repo"
258
259 -test_expect_success 'shallow fetches check connectivity before writing shallow file' '
259 +test_expect_success PERL_TEST_HELPERS 'shallow fetches check connectivity before writing shallow file' '
260 rm -rf "$REPO" client &&
261
262 git init "$REPO" &&
t/t5551-http-fetch-smart.sh
+7
@@ -7,6 +7,13 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8 . ./test-lib.sh
9 . "$TEST_DIRECTORY"/lib-httpd.sh
10 +
11 +if ! test_have_prereq PERL_TEST_HELPERS
12 +then
13 + skip_all='skipping http fetch smart tests; Perl not available'
14 + test_done
15 +fi
16 +
17 test "$HTTP_PROTO" = "HTTP/2" && enable_http2
18 start_httpd
19
t/t5562-http-backend-content-length.sh
+6
@@ -4,6 +4,12 @@ test_description='test git-http-backend respects CONTENT_LENGTH'
4
5 . ./test-lib.sh
6
7 +if ! test_have_prereq PERL_TEST_HELPERS
8 +then
9 + skip_all='skipping http backend content tests; Perl not available'
10 + test_done
11 +fi
12 +
13 test_lazy_prereq GZIP 'gzip --version'
14
15 verify_http_result() {
t/t5601-clone.sh
+2 -2
@@ -649,7 +649,7 @@ test_expect_success 'GIT_TRACE_PACKFILE produces a usable pack' '
649 git -C replay.git index-pack -v --stdin <tmp.pack
650 '
651
652 -test_expect_success 'clone on case-insensitive fs' '
652 +test_expect_success PERL_TEST_HELPERS 'clone on case-insensitive fs' '
653 git init icasefs &&
654 (
655 cd icasefs &&
@@ -662,7 +662,7 @@ test_expect_success 'clone on case-insensitive fs' '
662 )
663 '
664
665 -test_expect_success CASE_INSENSITIVE_FS 'colliding file detection' '
665 +test_expect_success PERL_TEST_HELPERS,CASE_INSENSITIVE_FS 'colliding file detection' '
666 grep X icasefs/warning &&
667 grep x icasefs/warning &&
668 test_grep "the following paths have collided" icasefs/warning
t/t5616-partial-clone.sh
+3 -3
@@ -751,7 +751,7 @@ replace_packfile () {
751 }' >"$HTTPD_ROOT_PATH/one-time-perl"
752 }
753
754 -test_expect_success 'upon cloning, check that all refs point to objects' '
754 +test_expect_success PERL_TEST_HELPERS 'upon cloning, check that all refs point to objects' '
755 SERVER="$HTTPD_DOCUMENT_ROOT_PATH/server" &&
756 rm -rf "$SERVER" repo &&
757 test_create_repo "$SERVER" &&
@@ -784,7 +784,7 @@ test_expect_success 'upon cloning, check that all refs point to objects' '
784 ! test -e "$HTTPD_ROOT_PATH/one-time-perl"
785 '
786
787 -test_expect_success 'when partial cloning, tolerate server not sending target of tag' '
787 +test_expect_success PERL_TEST_HELPERS 'when partial cloning, tolerate server not sending target of tag' '
788 SERVER="$HTTPD_DOCUMENT_ROOT_PATH/server" &&
789 rm -rf "$SERVER" repo &&
790 test_create_repo "$SERVER" &&
@@ -825,7 +825,7 @@ test_expect_success 'when partial cloning, tolerate server not sending target of
825 ! test -e "$HTTPD_ROOT_PATH/one-time-perl"
826 '
827
828 -test_expect_success 'tolerate server sending REF_DELTA against missing promisor objects' '
828 +test_expect_success PERL_TEST_HELPERS 'tolerate server sending REF_DELTA against missing promisor objects' '
829 SERVER="$HTTPD_DOCUMENT_ROOT_PATH/server" &&
830 rm -rf "$SERVER" repo &&
831 test_create_repo "$SERVER" &&
t/t5701-git-serve.sh
+1 -1
@@ -220,7 +220,7 @@ test_expect_success 'refs/heads prefix' '
220 test_cmp expect actual
221 '
222
223 -test_expect_success 'ignore very large set of prefixes' '
223 +test_expect_success PERL_TEST_HELPERS 'ignore very large set of prefixes' '
224 # generate a large number of ref-prefixes that we expect
225 # to match nothing; the value here exceeds TOO_MANY_PREFIXES
226 # from ls-refs.c.
t/t5702-protocol-v2.sh
+3 -3
@@ -1120,7 +1120,7 @@ test_expect_success 'push with http:// and a config of v2 does not request v2' '
1120 ! grep "git< version 2" log
1121 '
1122
1123 -test_expect_success 'when server sends "ready", expect DELIM' '
1123 +test_expect_success PERL_TEST_HELPERS 'when server sends "ready", expect DELIM' '
1124 rm -rf "$HTTPD_DOCUMENT_ROOT_PATH/http_parent" http_child &&
1125
1126 git init "$HTTPD_DOCUMENT_ROOT_PATH/http_parent" &&
@@ -1140,7 +1140,7 @@ test_expect_success 'when server sends "ready", expect DELIM' '
1140 test_grep "expected packfile to be sent after .ready." err
1141 '
1142
1143 -test_expect_success 'when server does not send "ready", expect FLUSH' '
1143 +test_expect_success PERL_TEST_HELPERS 'when server does not send "ready", expect FLUSH' '
1144 rm -rf "$HTTPD_DOCUMENT_ROOT_PATH/http_parent" http_child log &&
1145
1146 git init "$HTTPD_DOCUMENT_ROOT_PATH/http_parent" &&
@@ -1446,7 +1446,7 @@ test_expect_success 'http:// --negotiate-only' '
1446 grep "$COMMON" out
1447 '
1448
1449 -test_expect_success 'http:// --negotiate-only without wait-for-done support' '
1449 +test_expect_success PERL_TEST_HELPERS 'http:// --negotiate-only without wait-for-done support' '
1450 SERVER="server" &&
1451 URI="$HTTPD_URL/one_time_perl/server" &&
1452
t/t5703-upload-pack-ref-in-want.sh
+6
@@ -4,6 +4,12 @@ test_description='upload-pack ref-in-want'
4
5 . ./test-lib.sh
6
7 +if ! test_have_prereq PERL_TEST_HELPERS
8 +then
9 + skip_all='skipping upload-pack ref-in-want tests; Perl not available'
10 + test_done
11 +fi
12 +
13 get_actual_refs () {
14 sed -n -e '/wanted-refs/,/0001/{
15 /wanted-refs/d
t/t5710-promisor-remote-capability.sh
+6
@@ -4,6 +4,12 @@ test_description='handling of promisor remote advertisement'
4
5 . ./test-lib.sh
6
7 +if ! test_have_prereq PERL_TEST_HELPERS
8 +then
9 + skip_all='skipping promisor remote capabilities tests; Perl not available'
10 + test_done
11 +fi
12 +
13 GIT_TEST_MULTI_PACK_INDEX=0
14 GIT_TEST_MULTI_PACK_INDEX_WRITE_INCREMENTAL=0
15
t/t6002-rev-list-bisect.sh
+6
@@ -7,6 +7,12 @@ test_description='Tests git rev-list --bisect functionality'
7 . ./test-lib.sh
8 . "$TEST_DIRECTORY"/lib-t6000.sh # t6xxx specific functions
9
10 +if ! test_have_prereq PERL_TEST_HELPERS
11 +then
12 + skip_all='skipping rev-list bisect tests; Perl not available'
13 + test_done
14 +fi
15 +
16 # usage: test_bisection max-diff bisect-option head ^prune...
17 #
18 # e.g. test_bisection 1 --bisect l1 ^l0
t/t6003-rev-list-topo-order.sh
+6
@@ -8,6 +8,12 @@ test_description='Tests git rev-list --topo-order functionality'
8 . ./test-lib.sh
9 . "$TEST_DIRECTORY"/lib-t6000.sh # t6xxx specific functions
10
11 +if ! test_have_prereq PERL_TEST_HELPERS
12 +then
13 + skip_all='skipping rev-list topo-order tests; Perl not available'
14 + test_done
15 +fi
16 +
17 list_duplicates()
18 {
19 "$@" | sort | uniq -d
t/t6011-rev-list-with-bad-commit.sh
+6
@@ -4,6 +4,12 @@ test_description='git rev-list should notice bad commits'
4
5 . ./test-lib.sh
6
7 +if ! test_have_prereq PERL_TEST_HELPERS
8 +then
9 + skip_all='skipping rev-list with bad commit tests; Perl not available'
10 + test_done
11 +fi
12 +
13 # Note:
14 # - compression level is set to zero to make "corruptions" easier to perform
15 # - reflog is disabled to avoid extra references which would twart the test
t/t6013-rev-list-reverse-parents.sh
+2 -2
@@ -26,7 +26,7 @@ test_expect_success 'set up --reverse example' '
26 commit five
27 '
28
29 -test_expect_success '--reverse --parents --full-history combines correctly' '
29 +test_expect_success PERL_TEST_HELPERS '--reverse --parents --full-history combines correctly' '
30 git rev-list --parents --full-history main -- foo |
31 perl -e "print reverse <>" > expected &&
32 git rev-list --reverse --parents --full-history main -- foo \
@@ -34,7 +34,7 @@ test_expect_success '--reverse --parents --full-history combines correctly' '
34 test_cmp expected actual
35 '
36
37 -test_expect_success '--boundary does too' '
37 +test_expect_success PERL_TEST_HELPERS '--boundary does too' '
38 git rev-list --boundary --parents --full-history main ^root -- foo |
39 perl -e "print reverse <>" > expected &&
40 git rev-list --boundary --reverse --parents --full-history \
t/t6102-rev-list-unexpected-objects.sh
+6
@@ -4,6 +4,12 @@ test_description='git rev-list should handle unexpected object types'
4
5 . ./test-lib.sh
6
7 +if ! test_have_prereq PERL_TEST_HELPERS
8 +then
9 + skip_all='skipping rev-list unexpected objects tests; Perl not available'
10 + test_done
11 +fi
12 +
13 test_expect_success 'setup well-formed objects' '
14 blob="$(printf "foo" | git hash-object -w --stdin)" &&
15 tree="$(printf "100644 blob $blob\tfoo" | git mktree)" &&
t/t6115-rev-list-du.sh
+6
@@ -4,6 +4,12 @@ test_description='basic tests of rev-list --disk-usage'
4
5 . ./test-lib.sh
6
7 +if ! test_have_prereq PERL_TEST_HELPERS
8 +then
9 + skip_all='skipping rev-list disk usage tests; Perl not available'
10 + test_done
11 +fi
12 +
13 # we want a mix of reachable and unreachable, as well as
14 # objects in the bitmapped pack and some outside of it
15 test_expect_success 'set up repository' '
t/t6300-for-each-ref.sh
+6
@@ -10,6 +10,12 @@ GNUPGHOME_NOT_USED=$GNUPGHOME
10 . "$TEST_DIRECTORY"/lib-gpg.sh
11 . "$TEST_DIRECTORY"/lib-terminal.sh
12
13 +if ! test_have_prereq PERL_TEST_HELPERS
14 +then
15 + skip_all='skipping for-each-ref tests; Perl not available'
16 + test_done
17 +fi
18 +
19 # Mon Jul 3 23:18:43 2006 +0000
20 datestamp=1151968723
21 setdate_and_increment () {
t/t7006-pager.sh
+1 -1
@@ -661,7 +661,7 @@ test_expect_success 'setup trace2' '
661 export GIT_TRACE2_BRIEF
662 '
663
664 -test_expect_success 'setup large log output' '
664 +test_expect_success PERL_TEST_HELPERS 'setup large log output' '
665 perl -e "
666 print \"this is a long commit message\" x 50000
667 " >commit-msg &&
t/t7416-submodule-dash-url.sh
+6
@@ -4,6 +4,12 @@ test_description='check handling of disallowed .gitmodule urls'
4
5 . ./test-lib.sh
6
7 +if ! test_have_prereq PERL_TEST_HELPERS
8 +then
9 + skip_all='skipping submodule dash URL tests; Perl not available'
10 + test_done
11 +fi
12 +
13 test_expect_success 'setup' '
14 git config --global protocol.file.allow always
15 '
t/t7508-status.sh
+1 -1
@@ -1064,7 +1064,7 @@ test_expect_success 'status -s submodule summary (clean submodule)' '
1064 test_cmp expect output
1065 '
1066
1067 -test_expect_success 'status -z implies porcelain' '
1067 +test_expect_success PERL_TEST_HELPERS 'status -z implies porcelain' '
1068 git status --porcelain |
1069 perl -pe "s/\012/\000/g" >expect &&
1070 git status -z >output &&
t/t7815-grep-binary.sh
+6
@@ -4,6 +4,12 @@ test_description='git grep in binary files'
4
5 . ./test-lib.sh
6
7 +if ! test_have_prereq PERL_TEST_HELPERS
8 +then
9 + skip_all='skipping grep binary tests; Perl not available'
10 + test_done
11 +fi
12 +
13 test_expect_success 'setup' "
14 echo 'binaryQfileQm[*]cQ*æQð' | q_to_nul >a &&
15 git add a &&
t/t8001-annotate.sh
+6
@@ -7,6 +7,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7 TEST_CREATE_REPO_NO_TEMPLATE=1
8 . ./test-lib.sh
9
10 +if ! test_have_prereq PERL_TEST_HELPERS
11 +then
12 + skip_all='skipping annotate tests; Perl not available'
13 + test_done
14 +fi
15 +
16 PROG='git annotate'
17 . "$TEST_DIRECTORY"/annotate-tests.sh
18
t/t8002-blame.sh
+6
@@ -7,6 +7,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7 TEST_CREATE_REPO_NO_TEMPLATE=1
8 . ./test-lib.sh
9
10 +if ! test_have_prereq PERL_TEST_HELPERS
11 +then
12 + skip_all='skipping blame colors tests; Perl not available'
13 + test_done
14 +fi
15 +
16 PROG='git blame -c'
17 . "$TEST_DIRECTORY"/annotate-tests.sh
18
t/t8006-blame-textconv.sh
+6
@@ -4,6 +4,12 @@ test_description='git blame textconv support'
4
5 . ./test-lib.sh
6
7 +if ! test_have_prereq PERL_TEST_HELPERS
8 +then
9 + skip_all='skipping blame textconv tests; Perl not available'
10 + test_done
11 +fi
12 +
13 find_blame() {
14 sed -e 's/^[^(]*//'
15 }
t/t8011-blame-split-file.sh
+3 -3
@@ -81,7 +81,7 @@ do
81 git blame --root -C --$output combined >output
82 '
83
84 - test_expect_success "$output output finds correct commits" '
84 + test_expect_success PERL_TEST_HELPERS "$output output finds correct commits" '
85 generate_expect >expect <<-\EOF &&
86 5 base
87 1 modified
@@ -93,7 +93,7 @@ do
93 test_cmp expect actual
94 '
95
96 - test_expect_success "$output output shows correct filenames" '
96 + test_expect_success PERL_TEST_HELPERS "$output output shows correct filenames" '
97 generate_expect >expect <<-\EOF &&
98 11 one
99 11 two
@@ -102,7 +102,7 @@ do
102 test_cmp expect actual
103 '
104
105 - test_expect_success "$output output shows correct previous pointer" '
105 + test_expect_success PERL_TEST_HELPERS "$output output shows correct previous pointer" '
106 generate_expect >expect <<-EOF &&
107 5 NONE
108 1 $(git rev-parse modified^) one
t/t8012-blame-colors.sh
+6
@@ -7,6 +7,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7 TEST_CREATE_REPO_NO_TEMPLATE=1
8 . ./test-lib.sh
9
10 +if ! test_have_prereq PERL_TEST_HELPERS
11 +then
12 + skip_all='skipping blame colors tests; Perl not available'
13 + test_done
14 +fi
15 +
16 PROG='git blame -c'
17 . "$TEST_DIRECTORY"/annotate-tests.sh
18
t/t9137-git-svn-dcommit-clobber-series.sh
+2 -2
@@ -15,7 +15,7 @@ test_expect_success 'initialize repo' '
15 test -e file
16 '
17
18 -test_expect_success '(supposedly) non-conflicting change from SVN' '
18 +test_expect_success PERL_TEST_HELPERS '(supposedly) non-conflicting change from SVN' '
19 test x"$(sed -n -e 58p < file)" = x58 &&
20 test x"$(sed -n -e 61p < file)" = x61 &&
21 svn_cmd co "$svnrepo" tmp &&
@@ -37,7 +37,7 @@ test_expect_success 'some unrelated changes to git' "
37 git commit -m bye-life life
38 "
39
40 -test_expect_success 'change file but in unrelated area' "
40 +test_expect_success PERL_TEST_HELPERS 'change file but in unrelated area' "
41 test x\"\$(sed -n -e 4p < file)\" = x4 &&
42 test x\"\$(sed -n -e 7p < file)\" = x7 &&
43 perl -i.bak -p -e 's/^4\$/4444/' file &&
t/t9350-fast-export.sh
+1 -1
@@ -610,7 +610,7 @@ test_expect_success 'directory becomes symlink' '
610 (cd result && git show main:foo)
611 '
612
613 -test_expect_success 'fast-export quotes pathnames' '
613 +test_expect_success PERL_TEST_HELPERS 'fast-export quotes pathnames' '
614 git init crazy-paths &&
615 test_config -C crazy-paths core.protectNTFS false &&
616 (cd crazy-paths &&
t/t9850-shell.sh
+1 -1
@@ -29,7 +29,7 @@ test_expect_success 'shell allows interactive command' '
29 test_cmp expect actual
30 '
31
32 -test_expect_success 'shell complains of overlong commands' '
32 +test_expect_success PERL_TEST_HELPERS 'shell complains of overlong commands' '
33 perl -e "print \"a\" x 2**12 for (0..2**19)" |
34 test_must_fail git shell 2>err &&
35 grep "too long" err
t/test-lib.sh
+1
@@ -1706,6 +1706,7 @@ test -n "$USE_LIBPCRE2" && test_set_prereq LIBPCRE2
1706 test -z "$NO_GETTEXT" && test_set_prereq GETTEXT
1707 test -n "$SANITIZE_LEAK" && test_set_prereq SANITIZE_LEAK
1708 test -n "$GIT_VALGRIND_ENABLED" && test_set_prereq VALGRIND
1709 +test -n "$PERL_PATH" && test_set_prereq PERL_TEST_HELPERS
1710
1711 if test -z "$GIT_TEST_CHECK_CACHE_TREE"
1712 then