Permalink
Browse files

Merge pull request #7 from rackerjoe/master

Added ONESHOT variable. When set to 1 exercises.sh will fail on any FAILED  test.
  • Loading branch information...
2 parents 0075ebc + c7b6086 commit 034702d1c6ca10cfdad02538a9d95a152edf3b9a @breu breu committed Jul 6, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 exercise.sh
View
@@ -13,6 +13,7 @@ PACKAGESET=${1:-${PACKAGESET:-"diablo-final"}}
shift
TESTSCRIPTS=$@
BASEDIR=$(dirname $(readlink -f ${0}))
+ONESHOT=${ONESHOT-0}
set -u
@@ -238,6 +239,14 @@ for d in ${TESTS}; do
echo >> ${TMPDIR}/notice.txt
FAILED=$(( ${FAILED} + 1 ))
+ if [ $ONESHOT -eq 1 ]; then
+ echo; echo "ONESHOT ACTIVATED!"; echo
+ if [ -e ${TMPDIR}/notice.txt ]; then
+ colourise red ERROR TEST OUTPUT
+ cat ${TMPDIR}/notice.txt
+ fi
+ exit 1
+ fi
colourise ${resultcolour} " ${result}"
elif [ $SKIP_TEST -eq 0 ]; then
result=$(printf "%0.3fs" "${elapsed}")

0 comments on commit 034702d

Please sign in to comment.