Skip to content

Commit c650748

Browse files
avargitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0b69e4f commit c650748

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

t/gitweb-lib.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,9 @@ perl -MCGI -MCGI::Util -MCGI::Carp -e 0 >/dev/null 2>&1 || {
114114
test_done
115115
}
116116

117+
perl -mTime::HiRes -e 0 >/dev/null 2>&1 || {
118+
skip_all='skipping gitweb tests, Time::HiRes module not available'
119+
test_done
120+
}
121+
117122
gitweb_init

0 commit comments

Comments
 (0)