Merge "Fix error detection & exit in report_results"

This commit is contained in:
Jenkins 2015-11-18 17:18:28 +00:00 committed by Gerrit Code Review
commit a611ce95e3

View File

@ -92,16 +92,17 @@ function assert_empty {
fi
}
# print a summary of passing and failing tests, exiting
# with an error if we have failed tests
# Print a summary of passing and failing tests and exit
# (with an error if we have failed tests)
# usage: report_results
function report_results {
echo "$PASS Tests PASSED"
if [[ $ERROR -gt 1 ]]; then
if [[ $ERROR -gt 0 ]]; then
echo
echo "The following $ERROR tests FAILED"
echo -e "$FAILED_FUNCS"
echo "---"
exit 1
fi
exit 0
}