fix(run_unit_tests)_: don't exit in nightly runs (#5808)

This commit is contained in:
Igor Sirotin 2024-09-09 16:28:10 +01:00 committed by GitHub
parent 17c30ac532
commit 00db9c8a9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 7 deletions

View File

@ -127,13 +127,17 @@ else
wait
fi
for exit_code_file in "${GIT_ROOT}"/exit_code_*.txt; do
read exit_code < "${exit_code_file}"
if [[ "${exit_code}" -ne 0 ]]; then
echo -e "${RED}Testing failed${RST}, exit code: ${exit_code}"
exit ${exit_code}
fi
done
# When running in PRs (count=1), early exit if any test failed.
# When running nightly (count>1), generate test stats ant coverage reports anyway.
if [[ $UNIT_TEST_COUNT -eq 1 ]]; then
for exit_code_file in "${GIT_ROOT}"/exit_code_*.txt; do
read exit_code < "${exit_code_file}"
if [[ "${exit_code}" -ne 0 ]]; then
echo -e "${RED}Testing failed${RST}, exit code: ${exit_code}"
exit ${exit_code}
fi
done
fi
# Gather test coverage results
merged_coverage_report="coverage_merged.out"