Skip to content

Commit e25c122

Browse files
committed
Merge branch 'ab/cond-skip-tests' into maint
A few tests were run conditionally under (rare) conditions where they cannot be run (like running cvs tests under 'root' account). * ab/cond-skip-tests: gitweb tests: skip tests when we don't have Time::HiRes gitweb tests: change confusing "skip_all" phrasing cvs tests: skip tests that call "cvs commit" when running as root
2 parents bb622de + c650748 commit e25c122

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

t/gitweb-lib.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,12 @@ perl -MEncode -e '$e="";decode_utf8($e, Encode::FB_CROAK)' >/dev/null 2>&1 || {
110110
}
111111

112112
perl -MCGI -MCGI::Util -MCGI::Carp -e 0 >/dev/null 2>&1 || {
113-
skip_all='skipping gitweb tests, CGI module unusable'
113+
skip_all='skipping gitweb tests, CGI & CGI::Util & CGI::Carp modules not available'
114+
test_done
115+
}
116+
117+
perl -mTime::HiRes -e 0 >/dev/null 2>&1 || {
118+
skip_all='skipping gitweb tests, Time::HiRes module not available'
114119
test_done
115120
}
116121

t/t9200-git-cvsexportcommit.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ then
1818
test_done
1919
fi
2020

21+
if ! test_have_prereq NOT_ROOT; then
22+
skip_all='When cvs is compiled with CVS_BADROOT commits as root fail'
23+
test_done
24+
fi
25+
2126
CVSROOT=$PWD/tmpcvsroot
2227
CVSWORK=$PWD/cvswork
2328
GIT_DIR=$PWD/.git

t/t9600-cvsimport.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
test_description='git cvsimport basic tests'
44
. ./lib-cvs.sh
55

6+
if ! test_have_prereq NOT_ROOT; then
7+
skip_all='When cvs is compiled with CVS_BADROOT commits as root fail'
8+
test_done
9+
fi
10+
611
test_expect_success PERL 'setup cvsroot environment' '
712
CVSROOT=$(pwd)/cvsroot &&
813
export CVSROOT

0 commit comments

Comments
 (0)