summaryrefslogtreecommitdiff
path: root/t/gitweb-lib.sh
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2017-03-01 21:15:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-01 22:39:50 (GMT)
commitc6507484a2a87e53a5f0c4c01944192047bbeaa9 (patch)
treed72c1ae8a91b8520a6a25a3f03728f60ece9e5a0 /t/gitweb-lib.sh
parent0b69e4fa0af9a1c9fb1f8f7b73697990547af355 (diff)
downloadgit-c6507484a2a87e53a5f0c4c01944192047bbeaa9.zip
git-c6507484a2a87e53a5f0c4c01944192047bbeaa9.tar.gz
git-c6507484a2a87e53a5f0c4c01944192047bbeaa9.tar.bz2
gitweb tests: skip tests when we don't have Time::HiRes
Change the gitweb tests to skip when we can't load the Time::HiRes module. Gitweb needs this module to work. It has been in perl core since v5.8, which is the oldest version we support. However CentOS (and perhaps some other distributions) carve it into its own non-core-perl package that's not installed along with /usr/bin/perl by default. Without this we'll hard fail the gitweb tests when trying to load the module. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/gitweb-lib.sh')
-rw-r--r--t/gitweb-lib.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh
index 59ef15e..006d2a8 100644
--- a/t/gitweb-lib.sh
+++ b/t/gitweb-lib.sh
@@ -114,4 +114,9 @@ perl -MCGI -MCGI::Util -MCGI::Carp -e 0 >/dev/null 2>&1 || {
test_done
}
+perl -mTime::HiRes -e 0 >/dev/null 2>&1 || {
+ skip_all='skipping gitweb tests, Time::HiRes module not available'
+ test_done
+}
+
gitweb_init