diff --git a/schutzbot/run_base_tests.sh b/schutzbot/run_base_tests.sh index 30b195cd9..553ccfb45 100755 --- a/schutzbot/run_base_tests.sh +++ b/schutzbot/run_base_tests.sh @@ -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 diff --git a/schutzbot/run_image_tests.sh b/schutzbot/run_image_tests.sh index 41377370a..31d7e14ca 100755 --- a/schutzbot/run_image_tests.sh +++ b/schutzbot/run_image_tests.sh @@ -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