]> git.ipfire.org Git - thirdparty/git.git/commit
t: skip chain lint when PERL_PATH is unset
authorPatrick Steinhardt <ps@pks.im>
Thu, 3 Apr 2025 05:05:52 +0000 (07:05 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Apr 2025 21:47:36 +0000 (14:47 -0700)
commit8afecde5275f689bcbfb508aa47241dd7ecdf884
treeedd073eb1850d46202799f7d8e02bc38a23ae44a
parent683c54c999c301c2cd6f715c411407c413b1d84e
t: skip chain lint when PERL_PATH is unset

Our chainlint script verifies that test files have proper '&&' chains.
This script is written in Perl and executed for every test file before
executing the test logic itself.

In subsequent commits we're about to refactor our test suite so that
Perl becomes an optional dependency, only. And while it is already
possible to disable this linter, developers that don't have Perl
available at all would always have to disable the linter manually, which
is rather cumbersome.

Disable the chain linter automatically in case PERL_PATH isn't set to
make this a bit less annoying. Bail out with an error in case the
developer has asked explicitly for the chain linter.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh