Skip to content

Commit

Permalink
fix(builtin): fix bazel coverage masking test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan authored and alexeagle committed Sep 9, 2020
1 parent 4dcb37f commit 3d0d1f7
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions internal/node/launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,15 @@ if [ "${EXPECTED_EXIT_CODE}" != "0" ]; then
fi
fi

# Do not collect coverage for failed tests
if [ ${RESULT} -ne 0 ]; then
if [[ -n "${EXIT_CODE_CAPTURE}" ]]; then
exit 0
else
exit ${RESULT}
fi
fi

# Post process the coverage information after the process has exited
if [[ -n "${COVERAGE_DIR:-}" ]]; then
if [[ -n "${VERBOSE_LOGS:-}" ]]; then
Expand All @@ -366,8 +375,8 @@ if [[ -n "${COVERAGE_DIR:-}" ]]; then
RESULT="$?"
set -e

if [ ${RESULT} -ne 0 ]; then
exit ${RESULT}
if [[ -n "${EXIT_CODE_CAPTURE}" ]]; then
echo "${RESULT}" > "${EXIT_CODE_CAPTURE}"
fi
fi

Expand Down

0 comments on commit 3d0d1f7

Please sign in to comment.