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 <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Steffen Prohaska committed
Jan 26, 2008 at 10:54 UTC
7549376587ba5ffea973663f72804072d8f1d5dd
1 file changed
+4
-3
t/t9400-git-cvsserver-server.sh
+4
-3
@@ -33,13 +33,14 @@ CVS_SERVER=git-cvsserver
33
export CVSROOT CVS_SERVER
34
35
rm -rf "$CVSWORK" "$SERVERDIR"
36
-echo >empty &&
36
+test_expect_success 'setup' '
37
+ echo >empty &&
38
git add empty &&
39
git commit -q -m "First Commit" &&
40
git clone -q --local --bare "$WORKDIR/.git" "$SERVERDIR" >/dev/null 2>&1 &&
41
GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled true &&
41
- GIT_DIR="$SERVERDIR" git config gitcvs.logfile "$SERVERDIR/gitcvs.log" ||
42
- exit 1
42
+ GIT_DIR="$SERVERDIR" git config gitcvs.logfile "$SERVERDIR/gitcvs.log"
43
+'
44
45
# note that cvs doesn't accept absolute pathnames
46
# as argument to co -d