Set the exit status to reflect pass/fail.

For Travis compatibility, we set the exit code to non-zero when
any tests fail.

Fixes #5.
This commit is contained in:
David Jones 2014-03-17 13:43:13 +00:00
parent 98c23a2ab8
commit b95b010c0d
4 changed files with 8 additions and 0 deletions

View File

View File

@ -0,0 +1,6 @@
../../urchin "../Counts should be kept of successes and failures./.test" > /dev/null
case $? in
0) exit 8;;
*) exit 0;;
esac

View File

@ -0,0 +1 @@
../../urchin .test > /dev/null

1
urchin
View File

@ -111,6 +111,7 @@ urchin_go() {
set -- $(grep -e 'passed$' "$logfile"|wc -l) $(grep -e 'failed$' "$logfile"|wc -l)
printf '%s\n' "$1 $(plural test "$1") passed."
printf '%s\n' "$2 $(plural test "$2") failed."
return "$2"
}
urchin_molly_guard() {