Browse Source

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
maint
Junio C Hamano 8 years ago
parent
commit
e25c1229b2
  1. 7
      t/gitweb-lib.sh
  2. 5
      t/t9200-git-cvsexportcommit.sh
  3. 5
      t/t9600-cvsimport.sh

7
t/gitweb-lib.sh

@ -110,7 +110,12 @@ perl -MEncode -e '$e="";decode_utf8($e, Encode::FB_CROAK)' >/dev/null 2>&1 || { @@ -110,7 +110,12 @@ perl -MEncode -e '$e="";decode_utf8($e, Encode::FB_CROAK)' >/dev/null 2>&1 || {
}

perl -MCGI -MCGI::Util -MCGI::Carp -e 0 >/dev/null 2>&1 || {
skip_all='skipping gitweb tests, CGI module unusable'
skip_all='skipping gitweb tests, CGI & CGI::Util & CGI::Carp modules not available'
test_done
}

perl -mTime::HiRes -e 0 >/dev/null 2>&1 || {
skip_all='skipping gitweb tests, Time::HiRes module not available'
test_done
}


5
t/t9200-git-cvsexportcommit.sh

@ -18,6 +18,11 @@ then @@ -18,6 +18,11 @@ then
test_done
fi

if ! test_have_prereq NOT_ROOT; then
skip_all='When cvs is compiled with CVS_BADROOT commits as root fail'
test_done
fi

CVSROOT=$PWD/tmpcvsroot
CVSWORK=$PWD/cvswork
GIT_DIR=$PWD/.git

5
t/t9600-cvsimport.sh

@ -3,6 +3,11 @@ @@ -3,6 +3,11 @@
test_description='git cvsimport basic tests'
. ./lib-cvs.sh

if ! test_have_prereq NOT_ROOT; then
skip_all='When cvs is compiled with CVS_BADROOT commits as root fail'
test_done
fi

test_expect_success PERL 'setup cvsroot environment' '
CVSROOT=$(pwd)/cvsroot &&
export CVSROOT

Loading…
Cancel
Save