Merge "Fix error detection & exit in report_results"
This commit is contained in:
commit
a611ce95e3
@ -92,16 +92,17 @@ function assert_empty {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# print a summary of passing and failing tests, exiting
|
# Print a summary of passing and failing tests and exit
|
||||||
# with an error if we have failed tests
|
# (with an error if we have failed tests)
|
||||||
# usage: report_results
|
# usage: report_results
|
||||||
function report_results {
|
function report_results {
|
||||||
echo "$PASS Tests PASSED"
|
echo "$PASS Tests PASSED"
|
||||||
if [[ $ERROR -gt 1 ]]; then
|
if [[ $ERROR -gt 0 ]]; then
|
||||||
echo
|
echo
|
||||||
echo "The following $ERROR tests FAILED"
|
echo "The following $ERROR tests FAILED"
|
||||||
echo -e "$FAILED_FUNCS"
|
echo -e "$FAILED_FUNCS"
|
||||||
echo "---"
|
echo "---"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
exit 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user