tests: Fail if there were no tests executed. Fix #1002
This commit is contained in:
parent
e9b8b7e01f
commit
b48bff75bf
2 changed files with 4 additions and 4 deletions
|
|
@ -54,8 +54,8 @@ echo "😃 Passed tests:" "${PASSED_TESTS[@]}"
|
|||
echo "☹ Failed tests:" "${FAILED_TESTS[@]}"
|
||||
test_divider
|
||||
|
||||
# Exit with a failure if any tests failed.
|
||||
if [ ${#FAILED_TESTS[@]} -eq 0 ]; then
|
||||
# Exit with a failure if tests were executed and any of them failed.
|
||||
if [ ${#PASSED_TESTS[@]} -gt 0 ] && [ ${#FAILED_TESTS[@]} -eq 0 ]; then
|
||||
echo "🎉 All tests passed."
|
||||
exit 0
|
||||
else
|
||||
|
|
|
|||
|
|
@ -92,8 +92,8 @@ echo "😃 Passed tests: " "${PASSED_TESTS[@]}"
|
|||
echo "☹ Failed tests: " "${FAILED_TESTS[@]}"
|
||||
test_divider
|
||||
|
||||
# Exit with a failure if any tests failed.
|
||||
if [ ${#FAILED_TESTS[@]} -eq 0 ]; then
|
||||
# Exit with a failure if tests were executed and any of them failed.
|
||||
if [ ${#PASSED_TESTS[@]} -gt 0 ] && [ ${#FAILED_TESTS[@]} -eq 0 ]; then
|
||||
echo "🎉 All tests passed."
|
||||
exit 0
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue