git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/20] t: drop Perl as a mandatory prerequisite
@ 2025-03-20  9:35 Patrick Steinhardt
  2025-03-20  9:35 ` [PATCH 01/20] t: skip chain lint when PERL_PATH is unset Patrick Steinhardt
                   ` (22 more replies)
  0 siblings, 23 replies; 125+ messages in thread
From: Patrick Steinhardt @ 2025-03-20  9:35 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin

Hi,

while Git was initially building on Perl quite a lot, the significance
of Perl has been dwindling over the years as more and more functionality
was converted into C builtins. Nowadays, an installation with Perl-based
features disabled is almost fully functional, only a handful of features
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.

  - Our Perl bindings for Git.

  - The netrc Git credential helper.

None of these features really are critical for day-to-day usage of Git,
and most users probably wouldn't even notice if those features were not
installed. Perl is thus very much optional nowadays.

There is one big exception though: it is impossible to run our test
suite without a Perl interpreter, so it is not easily possible to verify
that a Perl-less installation actually works as expected. For most of
the part though our test suite doesn't use all that much Perl, either.
It is present in a couple of critical paths, but those are easy to adapt
to not use Perl anymore.

This is exactly what this patch series does: it refactors a couple of
central parts in our test suite to not use Perl anymore so that it
becomes possible to run most of our tests entirely without Perl. Tests
that still depend on Perl are marked with a new PERL_TEST_HELPERS prereq
so that they only execute when a Perl interpreter is available.

With this patch series, 30342 out of 31358 tests pass, which is around
97% of our tests.

Thanks!

Patrick

---
Patrick Steinhardt (20):
      t: skip chain lint when PERL_PATH is unset
      t: refactor environment sanitization to not use Perl
      t: adapt character translation helpers to not use Perl
      t: adapt `test_copy_bytes()` to not use Perl
      t: adapt `test_readlink()` to not use Perl
      t: introduce PERL_TEST_HELPERS prerequisite
      t: adapt existing PERL prerequisites
      meson: stop requiring Perl when tests are enabled
      Makefile: stop requiring Perl when running tests
      t: refactor tests depending on Perl transliteration operator
      t: refactor tests depending on Perl substitution operator
      t: refactor tests depending on Perl to print data
      t: refactor tests depending on Perl for textconv scripts
      t/lib-gpg: refactor `sanitize_pgp()` to not depend on Perl
      t/lib-t6000: refactor `name_from_description()` to not depend on Perl
      t/lib-httpd: refactor "one-time-perl" CGI script to not depend on Perl
      t0021: refactor `generate_random_characters()` to not depend on Perl
      t0210: refactor trace2 scrubbing to not use Perl
      t5316: refactor `max_chain()` to not depend on Perl
      t5703: refactor test to not depend on Perl

 meson.build                               |  2 +-
 t/Makefile                                | 16 +++++++--
 t/helper/test-path-utils.c                | 13 ++++++++
 t/helper/test-sha1.sh                     |  4 +--
 t/lib-diff.sh                             |  4 +--
 t/lib-gpg.sh                              |  6 +---
 t/lib-httpd.sh                            |  2 +-
 t/lib-httpd/apache.conf                   |  6 ++--
 t/lib-httpd/apply-one-time-perl.sh        | 27 ---------------
 t/lib-httpd/apply-one-time-script.sh      | 26 +++++++++++++++
 t/lib-t6000.sh                            | 13 ++++----
 t/t0008-ignores.sh                        |  4 +--
 t/t0021-conversion.sh                     | 13 ++++----
 t/t0090-cache-tree.sh                     |  4 +--
 t/t0210-trace2-normal.sh                  | 55 ++++++++++++++++++++++++-------
 t/t0210/scrub_normal.perl                 | 54 ------------------------------
 t/t0211-trace2-perf.sh                    |  6 ++++
 t/t0610-reftable-basics.sh                |  5 ++-
 t/t0613-reftable-write-options.sh         |  2 +-
 t/t1006-cat-file.sh                       | 16 +++++----
 t/t1007-hash-object.sh                    |  6 ++--
 t/t1010-mktree.sh                         |  4 +--
 t/t1450-fsck.sh                           |  6 ++--
 t/t3300-funny-names.sh                    |  6 ++--
 t/t4013-diff-various.sh                   |  6 ++++
 t/t4014-format-patch.sh                   | 30 ++++++++---------
 t/t4020-diff-external.sh                  |  2 +-
 t/t4029-diff-trailing-space.sh            |  3 +-
 t/t4030-diff-textconv.sh                  |  9 ++---
 t/t4031-diff-rewrite-binary.sh            | 17 ++++------
 t/t4058-diff-duplicates.sh                |  6 ++++
 t/t4103-apply-binary.sh                   |  6 ++--
 t/t4116-apply-reverse.sh                  |  4 +--
 t/t4150-am.sh                             |  8 ++---
 t/t4200-rerere.sh                         |  8 ++---
 t/t4205-log-pretty-formats.sh             |  6 ++--
 t/t4216-log-bloom.sh                      |  8 ++---
 t/t5004-archive-corner-cases.sh           |  6 ++++
 t/t5300-pack-object.sh                    | 10 +++---
 t/t5303-pack-corruption-resilience.sh     |  6 ++--
 t/t5310-pack-bitmaps.sh                   |  2 +-
 t/t5316-pack-delta-depth.sh               | 10 +++---
 t/t5318-commit-graph.sh                   | 12 +++----
 t/t5319-multi-pack-index.sh               | 16 ++++-----
 t/t5324-split-commit-graph.sh             |  2 +-
 t/t5326-multi-pack-bitmaps.sh             |  4 +--
 t/t5328-commit-graph-64bit-time.sh        |  2 +-
 t/t5333-pseudo-merge-bitmaps.sh           | 12 +++----
 t/t5400-send-pack.sh                      |  2 +-
 t/t5410-receive-pack-alternates.sh        |  2 +-
 t/t5503-tagfollow.sh                      |  6 ++++
 t/t5504-fetch-receive-strict.sh           |  2 +-
 t/t5510-fetch.sh                          |  6 ++++
 t/t5532-fetch-proxy.sh                    |  6 ++++
 t/t5534-push-signed.sh                    |  2 +-
 t/t5537-fetch-shallow.sh                  | 15 ++++-----
 t/t5551-http-fetch-smart.sh               |  7 ++++
 t/t5562-http-backend-content-length.sh    |  6 ++++
 t/t5601-clone.sh                          |  4 +--
 t/t5616-partial-clone.sh                  | 46 ++++++++++++++------------
 t/t5701-git-serve.sh                      |  5 ++-
 t/t5702-protocol-v2.sh                    | 21 +++++++-----
 t/t5703-upload-pack-ref-in-want.sh        | 29 ++++++++--------
 t/t5710-promisor-remote-capability.sh     |  6 ++++
 t/t6011-rev-list-with-bad-commit.sh       | 14 +++++---
 t/t6013-rev-list-reverse-parents.sh       | 10 +++---
 t/t6102-rev-list-unexpected-objects.sh    |  6 ++++
 t/t6115-rev-list-du.sh                    |  2 +-
 t/t6300-for-each-ref.sh                   | 15 ++++++---
 t/t7006-pager.sh                          |  6 ++--
 t/t7416-submodule-dash-url.sh             |  3 +-
 t/t7501-commit-basic-functionality.sh     |  6 ++--
 t/t7508-status.sh                         |  2 +-
 t/t7815-grep-binary.sh                    |  9 ++---
 t/t8001-annotate.sh                       |  6 ++++
 t/t8002-blame.sh                          |  8 ++++-
 t/t8006-blame-textconv.sh                 |  2 +-
 t/t8011-blame-split-file.sh               |  6 ++--
 t/t8012-blame-colors.sh                   |  6 ++++
 t/t9137-git-svn-dcommit-clobber-series.sh | 10 +++---
 t/t9350-fast-export.sh                    |  2 +-
 t/t9850-shell.sh                          |  2 +-
 t/test-lib-functions.sh                   | 20 +++--------
 t/test-lib.sh                             | 49 +++++++++++++++++----------
 84 files changed, 471 insertions(+), 373 deletions(-)


---
base-commit: 683c54c999c301c2cd6f715c411407c413b1d84e
change-id: 20250317-b4-pks-t-perlless-138cf94696b8


^ permalink raw reply	[flat|nested] 125+ messages in thread

end of thread, other threads:[~2025-07-07  9:53 UTC | newest]

Thread overview: 125+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-20  9:35 [PATCH 00/20] t: drop Perl as a mandatory prerequisite Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 01/20] t: skip chain lint when PERL_PATH is unset Patrick Steinhardt
2025-03-20 18:36   ` Eric Sunshine
2025-03-20  9:35 ` [PATCH 02/20] t: refactor environment sanitization to not use Perl Patrick Steinhardt
2025-03-21  9:52   ` Karthik Nayak
2025-03-20  9:35 ` [PATCH 03/20] t: adapt character translation helpers " Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 04/20] t: adapt `test_copy_bytes()` " Patrick Steinhardt
2025-03-21  9:56   ` Karthik Nayak
2025-03-20  9:35 ` [PATCH 05/20] t: adapt `test_readlink()` " Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 06/20] t: introduce PERL_TEST_HELPERS prerequisite Patrick Steinhardt
2025-03-20 18:55   ` Eric Sunshine
2025-03-24 12:46     ` Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 07/20] t: adapt existing PERL prerequisites Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 08/20] meson: stop requiring Perl when tests are enabled Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 09/20] Makefile: stop requiring Perl when running tests Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 10/20] t: refactor tests depending on Perl transliteration operator Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 11/20] t: refactor tests depending on Perl substitution operator Patrick Steinhardt
2025-03-24 16:16   ` Phillip Wood
2025-03-20  9:35 ` [PATCH 12/20] t: refactor tests depending on Perl to print data Patrick Steinhardt
2025-03-20 19:33   ` Eric Sunshine
2025-03-24 12:46     ` Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 13/20] t: refactor tests depending on Perl for textconv scripts Patrick Steinhardt
2025-03-20 19:37   ` Eric Sunshine
2025-03-24 12:46     ` Patrick Steinhardt
2025-03-24 16:07       ` Eric Sunshine
2025-03-25 12:42         ` Patrick Steinhardt
2025-03-24 16:16   ` Phillip Wood
2025-03-25 12:43     ` Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 14/20] t/lib-gpg: refactor `sanitize_pgp()` to not depend on Perl Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 15/20] t/lib-t6000: refactor `name_from_description()` " Patrick Steinhardt
2025-03-20 19:41   ` Eric Sunshine
2025-03-24 12:46     ` Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 16/20] t/lib-httpd: refactor "one-time-perl" CGI script " Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 17/20] t0021: refactor `generate_random_characters()` " Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 18/20] t0210: refactor trace2 scrubbing to not use Perl Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 19/20] t5316: refactor `max_chain()` to not depend on Perl Patrick Steinhardt
2025-03-20  9:35 ` [PATCH 20/20] t5703: refactor test " Patrick Steinhardt
2025-03-25 13:14 ` [PATCH v2 00/20] t: drop Perl as a mandatory prerequisite Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 01/20] t: skip chain lint when PERL_PATH is unset Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 02/20] t: refactor environment sanitization to not use Perl Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 03/20] t: adapt character translation helpers " Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 04/20] t: adapt `test_copy_bytes()` " Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 05/20] t: adapt `test_readlink()` " Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 06/20] t: introduce PERL_TEST_HELPERS prerequisite Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 07/20] t: adapt existing PERL prerequisites Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 08/20] meson: stop requiring Perl when tests are enabled Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 09/20] Makefile: stop requiring Perl when running tests Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 10/20] t: refactor tests depending on Perl transliteration operator Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 11/20] t: refactor tests depending on Perl substitution operator Patrick Steinhardt
2025-03-25 14:35     ` Phillip Wood
2025-03-27 10:19       ` Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 12/20] t: refactor tests depending on Perl to print data Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 13/20] t: refactor tests depending on Perl for textconv scripts Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 14/20] t/lib-gpg: refactor `sanitize_pgp()` to not depend on Perl Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 15/20] t/lib-t6000: refactor `name_from_description()` " Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 16/20] t/lib-httpd: refactor "one-time-perl" CGI script " Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 17/20] t0021: refactor `generate_random_characters()` " Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 18/20] t0210: refactor trace2 scrubbing to not use Perl Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 19/20] t5316: refactor `max_chain()` to not depend on Perl Patrick Steinhardt
2025-03-25 13:14   ` [PATCH v2 20/20] t5703: refactor test " Patrick Steinhardt
2025-03-27 10:36 ` [PATCH v3 00/20] t: drop Perl as a mandatory prerequisite Patrick Steinhardt
2025-03-27 10:36   ` [PATCH v3 01/20] t: skip chain lint when PERL_PATH is unset Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 02/20] t: refactor environment sanitization to not use Perl Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 03/20] t: adapt character translation helpers " Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 04/20] t: adapt `test_copy_bytes()` " Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 05/20] t: adapt `test_readlink()` " Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 06/20] t: introduce PERL_TEST_HELPERS prerequisite Patrick Steinhardt
2025-04-01 18:26     ` Johannes Schindelin
2025-04-02  7:16       ` Patrick Steinhardt
2025-04-02 19:10         ` Johannes Schindelin
2025-04-03  5:05           ` Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 07/20] t: adapt existing PERL prerequisites Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 08/20] meson: stop requiring Perl when tests are enabled Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 09/20] Makefile: stop requiring Perl when running tests Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 10/20] t: refactor tests depending on Perl transliteration operator Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 11/20] t: refactor tests depending on Perl substitution operator Patrick Steinhardt
2025-04-01 18:32     ` Johannes Schindelin
2025-04-02  7:16       ` Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 12/20] t: refactor tests depending on Perl to print data Patrick Steinhardt
2025-04-01 18:35     ` Johannes Schindelin
2025-04-02  7:16       ` Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 13/20] t: refactor tests depending on Perl for textconv scripts Patrick Steinhardt
2025-04-01 18:55     ` Johannes Schindelin
2025-04-02  7:16       ` Patrick Steinhardt
2025-04-02 19:17         ` Johannes Schindelin
2025-03-27 10:37   ` [PATCH v3 14/20] t/lib-gpg: refactor `sanitize_pgp()` to not depend on Perl Patrick Steinhardt
2025-04-01 18:56     ` Johannes Schindelin
2025-04-02  7:16       ` Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 15/20] t/lib-t6000: refactor `name_from_description()` " Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 16/20] t/lib-httpd: refactor "one-time-perl" CGI script " Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 17/20] t0021: refactor `generate_random_characters()` " Patrick Steinhardt
2025-04-01 19:04     ` Johannes Schindelin
2025-04-02  7:16       ` Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 18/20] t0210: refactor trace2 scrubbing to not use Perl Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 19/20] t5316: refactor `max_chain()` to not depend on Perl Patrick Steinhardt
2025-03-27 10:37   ` [PATCH v3 20/20] t5703: refactor test " Patrick Steinhardt
2025-03-28 10:29   ` [PATCH v3 00/20] t: drop Perl as a mandatory prerequisite Phillip Wood
2025-04-02 19:32   ` Johannes Schindelin
2025-04-03  5:05 ` [PATCH v4 " Patrick Steinhardt
2025-04-03  5:05   ` [PATCH v4 01/20] t: skip chain lint when PERL_PATH is unset Patrick Steinhardt
2025-04-03  5:05   ` [PATCH v4 02/20] t: refactor environment sanitization to not use Perl Patrick Steinhardt
2025-04-03  5:05   ` [PATCH v4 03/20] t: adapt character translation helpers " Patrick Steinhardt
2025-04-03  5:05   ` [PATCH v4 04/20] t: adapt `test_copy_bytes()` " Patrick Steinhardt
2025-04-03  5:05   ` [PATCH v4 05/20] t: adapt `test_readlink()` " Patrick Steinhardt
2025-04-03  5:05   ` [PATCH v4 06/20] t: introduce PERL_TEST_HELPERS prerequisite Patrick Steinhardt
2025-04-03  5:05   ` [PATCH v4 07/20] t: adapt existing PERL prerequisites Patrick Steinhardt
2025-04-03  5:05   ` [PATCH v4 08/20] meson: stop requiring Perl when tests are enabled Patrick Steinhardt
2025-04-03  5:06   ` [PATCH v4 09/20] Makefile: stop requiring Perl when running tests Patrick Steinhardt
2025-04-03  5:06   ` [PATCH v4 10/20] t: refactor tests depending on Perl transliteration operator Patrick Steinhardt
2025-04-03  5:06   ` [PATCH v4 11/20] t: refactor tests depending on Perl substitution operator Patrick Steinhardt
2025-04-03  5:06   ` [PATCH v4 12/20] t: refactor tests depending on Perl to print data Patrick Steinhardt
2025-06-10 19:52     ` SZEDER Gábor
2025-06-10 21:31       ` Junio C Hamano
2025-07-07  9:53         ` Patrick Steinhardt
2025-06-10 21:44       ` Junio C Hamano
2025-04-03  5:06   ` [PATCH v4 13/20] t: refactor tests depending on Perl for textconv scripts Patrick Steinhardt
2025-04-03  5:06   ` [PATCH v4 14/20] t/lib-gpg: refactor `sanitize_pgp()` to not depend on Perl Patrick Steinhardt
2025-04-03  5:06   ` [PATCH v4 15/20] t/lib-t6000: refactor `name_from_description()` " Patrick Steinhardt
2025-04-03  5:06   ` [PATCH v4 16/20] t/lib-httpd: refactor "one-time-perl" CGI script " Patrick Steinhardt
2025-04-03  5:06   ` [PATCH v4 17/20] t0021: refactor `generate_random_characters()` " Patrick Steinhardt
2025-04-03  5:06   ` [PATCH v4 18/20] t0210: refactor trace2 scrubbing to not use Perl Patrick Steinhardt
2025-04-03  5:06   ` [PATCH v4 19/20] t5316: refactor `max_chain()` to not depend on Perl Patrick Steinhardt
2025-04-03  5:06   ` [PATCH v4 20/20] t5703: refactor test " Patrick Steinhardt
2025-04-03 12:12   ` [PATCH v4 00/20] t: drop Perl as a mandatory prerequisite Johannes Schindelin
2025-04-08  0:32     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).