From: Steffen Prohaska Date: Sat, 26 Jan 2008 09:54:05 +0000 (+0100) Subject: t9400-git-cvsserver-server: Wrap setup into test case X-Git-Tag: v1.5.4-rc5~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7549376587ba5ffea973663f72804072d8f1d5dd;p=git.git t9400-git-cvsserver-server: Wrap setup into test case It is preferable to have the test setup in a test case. The setup itself may fail and having it as a test case handles this situation more gracefully. Signed-off-by: Steffen Prohaska Signed-off-by: Junio C Hamano --- diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh index 641303e0a..1f2749eef 100755 --- a/t/t9400-git-cvsserver-server.sh +++ b/t/t9400-git-cvsserver-server.sh @@ -33,13 +33,14 @@ CVS_SERVER=git-cvsserver export CVSROOT CVS_SERVER rm -rf "$CVSWORK" "$SERVERDIR" -echo >empty && +test_expect_success 'setup' ' + echo >empty && git add empty && git commit -q -m "First Commit" && git clone -q --local --bare "$WORKDIR/.git" "$SERVERDIR" >/dev/null 2>&1 && GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled true && - GIT_DIR="$SERVERDIR" git config gitcvs.logfile "$SERVERDIR/gitcvs.log" || - exit 1 + GIT_DIR="$SERVERDIR" git config gitcvs.logfile "$SERVERDIR/gitcvs.log" +' # note that cvs doesn't accept absolute pathnames # as argument to co -d