Thread (2 messages) 2 messages, 1 author, 2016-06-15

[PATCH 1/2] t9400-git-cvsserver-server: Wrap setup into test case

flat view
DORMANTno replies

From: Steffen Prohaska <hidden>
Date: 2016-06-15 22:44:08
Subsystem: the rest · Maintainer: Linus Torvalds

The prefer to have the test setup in a test case.  The setup
itself may fail and having it as a test case handles this
situation gracefully.

Signed-off-by: Steffen Prohaska <redacted>
---
 t/t9400-git-cvsserver-server.sh |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index 641303e..1f2749e 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
-- 
1.5.4.rc4.42.gacc73
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help