]> git.ipfire.org Git - thirdparty/git.git/commit
t/perf: use configured PERL_PATH
authorPatrick Steinhardt <ps@pks.im>
Mon, 28 Apr 2025 07:30:47 +0000 (09:30 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Apr 2025 20:13:51 +0000 (13:13 -0700)
commitd84b990883284920234f5bc951ea285161fc7bca
treebc5fc4a4aa10911615806e67e2f87793d6f32e45
parent5a6b9c81554a905b9798e4df1b2ab2e5a79a0c1f
t/perf: use configured PERL_PATH

Our benchmarks use a couple of Perl scripts to compute results. These
Perl scripts get executed directly, and as the shebang is hardcoded to
"/usr/bin/perl" this will fail on any system where the Perl interpreter
is located in a different path.

Our build infrastructure already lets users configure the location of
Perl, which ultimately gets written into the GIT-BUILD-OPTIONS file.
This file is being sourced by "test-lib.sh", and consequently we already
have the "PERL_PATH" variable available that contains its configured
location.

Use "PERL_PATH" to execute Perl scripts, which makes them work on more
esoteric systems like NixOS. Furthermore, adapt the shebang to use
env(1) to execute Perl so that users who have Perl in PATH, but in a
non-standard location can execute the script directly.

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