From: Dan Vanderkam Date: Sat, 14 Jun 2014 02:22:19 +0000 (-0400) Subject: Make test.sh return an error code on failure. X-Git-Tag: v1.1.0~59 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=f03a5817598f7afe0e2da55e4f6e578b7b127915;p=dygraphs.git Make test.sh return an error code on failure. --- 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