tests: skip perl tests if NO_PERL is defined

These scripts all test git programs that are written in
perl, and thus obviously won't work if NO_PERL is defined.
We pass NO_PERL to the scripts from the building Makefile
via the GIT-BUILD-OPTIONS file.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2009-04-03 15:33:59 -04:00
committed by Junio C Hamano
parent 499c29394c
commit 1b19ccd236
12 changed files with 48 additions and 2 deletions

View File

@ -65,6 +65,11 @@ gitweb_run () {
. ./test-lib.sh
if ! test_have_prereq PERL; then
say 'skipping gitweb tests, perl not available'
test_done
fi
perl -MEncode -e 'decode_utf8("", Encode::FB_CROAK)' >/dev/null 2>&1 || {
say 'skipping gitweb tests, perl version is too old'
test_done