Permalink
Browse files

test suite: catch internal errors better

...so you don't have to look at all the output for any strangeness

(also make rollback a little quieter)
  • Loading branch information...
1 parent a430cc5 commit 3c5bd4a131492e85a269bbec3eba86a9e1387c25 @sitaramc committed Jun 18, 2010
View
@@ -7,5 +7,5 @@ rm -rf gitolite-admin td
tar xf rollback.tar
mkdir td
-scp $TESTDIR/rollback.server gitolite-test@localhost:rollback
+scp -q $TESTDIR/rollback.server gitolite-test@localhost:rollback || { echo scp failed; exit 1; }
ssh gitolite-test@localhost ./rollback
View
@@ -1,6 +1,6 @@
# vim: syn=sh:
cd $TESTDIR
-$TESTDIR/rollback
+$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG 1
editrc GL_NO_DAEMON_NO_GITWEB 1
catrc
View
@@ -1,5 +1,5 @@
# vim: syn=sh:
-$TESTDIR/rollback
+$TESTDIR/rollback || die "rollback failed"
# ----------
name "basic push admin repo"
@@ -68,3 +68,5 @@ runlocal git reset --hard HEAD^
mdc
runlocal git push -f origin HEAD
expect "remote: + refs/heads/master aa u2 DENIED by fallthru"
+
+name INTERNAL
View
@@ -1,6 +1,6 @@
# vim: syn=sh:
# ----------
-$TESTDIR/rollback
+$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG 0
name "base output with no groups"
@@ -14,7 +14,7 @@ catconf
expect_filesame $TESTDIR/out/t01-repo-groups.1
# ----------
-$TESTDIR/rollback
+$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG 0
name "output with eqvt repo groups"
@@ -29,7 +29,7 @@ catconf
expect_filesame $TESTDIR/out/t01-repo-groups.1
# ----------
-$TESTDIR/rollback
+$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG 1
name "base output with no groups but GL_BIG_CONFIG on"
@@ -43,7 +43,7 @@ catconf
expect_filesame $TESTDIR/out/t01-repo-groups.1
# ----------
-$TESTDIR/rollback
+$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG 1
name "repo groups with GL_BIG_CONFIG on"
@@ -56,3 +56,5 @@ echo "
catconf
expect_filesame $TESTDIR/out/t01-repo-groups.2
+
+name INTERNAL
View
@@ -1,6 +1,6 @@
# vim: syn=sh:
# ----------
-$TESTDIR/rollback
+$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG 0
name "base output with no groups"
@@ -14,7 +14,7 @@ catconf
expect_filesame $TESTDIR/out/t02-user-groups.1
# ----------
-$TESTDIR/rollback
+$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG 0
name "output with eqvt user groups"
@@ -32,7 +32,7 @@ catconf
expect_filesame $TESTDIR/out/t02-user-groups.1
# ----------
-$TESTDIR/rollback
+$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG 1
name "base output with no groups but GL_BIG_CONFIG on"
@@ -46,7 +46,7 @@ catconf
expect_filesame $TESTDIR/out/t02-user-groups.1
# ----------
-$TESTDIR/rollback
+$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG 1
name "user groups with GL_BIG_CONFIG on"
@@ -62,3 +62,5 @@ echo "
catconf
expect_filesame $TESTDIR/out/t02-user-groups.2
+
+name INTERNAL
View
@@ -1,6 +1,6 @@
# vim: syn=sh:
# ----------
-$TESTDIR/rollback
+$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG 0
echo ===== testing with GL_BIG_CONFIG set to 0 =====
@@ -10,11 +10,13 @@ cd $TESTDIR
cd $TESTDIR
# ----------
-$TESTDIR/rollback
+$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG 1
echo ===== testing with GL_BIG_CONFIG set to 1 =====
cd $TESTDIR
. ./t03a-branch-permissions
cd $TESTDIR
+
+name INTERNAL
View
@@ -8,7 +8,7 @@ do
hl t04-wild with GL_WILDREPOS $i, C=@$j
cd $TESTDIR
- $TESTDIR/rollback
+ $TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG $i
editrc GL_WILDREPOS 1
. ./t04a-wild-$j
View
@@ -1,6 +1,6 @@
# vim: syn=sh:
cd $TESTDIR
-$TESTDIR/rollback
+$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG $1
# ----------
View
@@ -1,6 +1,6 @@
# vim: syn=sh:
cd $TESTDIR
-$TESTDIR/rollback
+$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG $1
name "bad repo name"
View
@@ -2,7 +2,7 @@
for bc in 0 1
do
cd $TESTDIR
- $TESTDIR/rollback
+ $TESTDIR/rollback || die "rollback failed"
editrc GL_WILDREPOS 1
editrc GL_BIG_CONFIG $bc
@@ -48,7 +48,7 @@ do
name "INTERNAL"
cd $TESTDIR
- $TESTDIR/rollback
+ $TESTDIR/rollback || die "rollback failed"
editrc GL_WILDREPOS 1
editrc GL_BIG_CONFIG $bc
View
@@ -4,7 +4,7 @@ do
for bc in 0 1
do
cd $TESTDIR
- $TESTDIR/rollback
+ $TESTDIR/rollback || die "rollback failed"
editrc GL_WILDREPOS $wr
editrc GL_BIG_CONFIG $bc
View
@@ -2,7 +2,7 @@
for bc in 0 1
do
cd $TESTDIR
- $TESTDIR/rollback
+ $TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG $bc
# ----------
@@ -4,7 +4,7 @@ do
for bc in 0 1
do
cd $TESTDIR
- $TESTDIR/rollback
+ $TESTDIR/rollback || die "rollback failed"
editrc GL_WILDREPOS $wr
editrc GL_BIG_CONFIG $bc
View
@@ -152,9 +152,8 @@ arg1=$1; shift
for testfile in ${arg1:-t??-}*
do
hl $testfile
- . $testfile "$@"
+ . $testfile "$@" || die "$testfile failed"
cd $TESTDIR
- hl $testfile DONE
done
print_summary

0 comments on commit 3c5bd4a

Please sign in to comment.