Skip to content

Commit a611ce9

Browse files
Jenkinsopenstack-gerrit
Jenkins
authored andcommitted
Merge "Fix error detection & exit in report_results"
2 parents fa8464b + ca7e4f2 commit a611ce9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/unittest.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,17 @@ function assert_empty {
9292
fi
9393
}
9494

95-
# print a summary of passing and failing tests, exiting
96-
# with an error if we have failed tests
95+
# Print a summary of passing and failing tests and exit
96+
# (with an error if we have failed tests)
9797
# usage: report_results
9898
function report_results {
9999
echo "$PASS Tests PASSED"
100-
if [[ $ERROR -gt 1 ]]; then
100+
if [[ $ERROR -gt 0 ]]; then
101101
echo
102102
echo "The following $ERROR tests FAILED"
103103
echo -e "$FAILED_FUNCS"
104104
echo "---"
105105
exit 1
106106
fi
107+
exit 0
107108
}

0 commit comments

Comments
 (0)