diff options
author | Jeff King <peff@peff.net> | 2023-04-06 05:36:02 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-04-06 09:29:43 -0700 |
commit | c1917156a04e371f33cc344af093a8b237e09eb1 (patch) | |
tree | 7bfe37aa4e7ec668aa2763d43309912fff43e4f7 /t/lib-httpd/apache.conf | |
parent | 7556e5d737b917d31ac3729b0f5e2391da7e132a (diff) | |
download | git-c1917156a04e371f33cc344af093a8b237e09eb1.tar.gz |
t/lib-httpd: pass PERL_PATH to CGI scripts
As discussed in t/README, tests should aim to use PERL_PATH rather than
straight "perl". We usually do this automatically with a "perl" function
in test-lib.sh, but a few cases need to be handled specially.
One such case is the apply-one-time-perl.sh CGI, which invokes plain
"perl". It should be using $PERL_PATH, but to make that work, we must
also instruct Apache to pass through the variable.
Prior to this patch, doing:
mv /usr/bin/perl /usr/bin/my-perl
make PERL_PATH=/usr/bin/my-perl test
would fail t5702, t5703, and t5616. After this it passes. This is a
pretty extreme case, as even if you install perl elsewhere, you'd likely
still have it in your $PATH. A more realistic case is that you don't
want to use the perl in your $PATH (because it's older, broken, etc) and
expect PERL_PATH to consistently override that (since that's what it's
documented to do). Removing it completely is just a convenient way of
completely breaking it for testing purposes.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-httpd/apache.conf')
-rw-r--r-- | t/lib-httpd/apache.conf | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf index 706799391b..f8946a289d 100644 --- a/t/lib-httpd/apache.conf +++ b/t/lib-httpd/apache.conf @@ -86,6 +86,8 @@ PassEnv LC_ALL Alias /dumb/ www/ Alias /auth/dumb/ www/auth/dumb/ +SetEnv PERL_PATH ${PERL_PATH} + <LocationMatch /smart/> SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH} SetEnv GIT_HTTP_EXPORT_ALL |