From f03a5817598f7afe0e2da55e4f6e578b7b127915 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Fri, 13 Jun 2014 22:22:19 -0400 Subject: [PATCH 1/1] Make test.sh return an error code on failure. --- test.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 9ca252e..3194c72 100755 --- a/test.sh +++ b/test.sh @@ -16,4 +16,9 @@ if [ $? != 0 ]; then exit 1 fi -phantomjs phantom-driver.js $* +phantomjs phantom-driver.js $* | tee /tmp/test-results.txt +trap "rm -f /tmp/test-results.txt" EXIT +if grep -q 'FAIL' /tmp/test-results.txt; then + echo One or more tests failed. + exit 1 +fi -- 2.7.4