Skip to content

Commit

Permalink
t9600-cvsimport.sh: set HOME before checking for cvsps availability
Browse files Browse the repository at this point in the history
This actually sounds like a bug in cvsps, which requires an existing
home directory when asked for the usage through -h

 $ HOME=/nonexistent cvsps -h
 Cannot create the cvsps directory '.cvsps': No such file or directory

This made t9600 think that cvsps is not available if HOME did not exist,
causing the tests to be skipped

 $ HOME=/nonexistent sh t9600-cvsimport.sh
 * skipping cvsimport tests, cvsps not found
 * passed all 0 test(s)

Now t9600 sets HOME to the current working directory before checking for
the availability of the cvsps program.

This issue has been discovered by Marco Rodrigues, and fixed by Frank
Lichtenheld through
 http://bugs.debian.org/471969

Signed-off-by: Gerrit Pape <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
flichtenheld authored and gitster committed Mar 26, 2008
1 parent af05d67 commit 40ae887
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions t/t9600-cvsimport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
test_description='git-cvsimport basic tests'
. ./test-lib.sh

CVSROOT=$(pwd)/cvsroot
export CVSROOT
# for clean cvsps cache
HOME=$(pwd)
export HOME

if ! type cvs >/dev/null 2>&1
then
say 'skipping cvsimport tests, cvs not found'
Expand All @@ -26,12 +32,6 @@ case "$cvsps_version" in
;;
esac

CVSROOT=$(pwd)/cvsroot
export CVSROOT
# for clean cvsps cache
HOME=$(pwd)
export HOME

test_expect_success 'setup cvsroot' 'cvs init'

test_expect_success 'setup a cvs module' '
Expand Down

0 comments on commit 40ae887

Please sign in to comment.