Skip to content

Commit

Permalink
Make CC_CODE_COVERAGE_SCRIPT failures fail tests
Browse files Browse the repository at this point in the history
If you're editing, or overriding, this script and you introduce and
introduce an error, previously this wouldn't fail the test invocation.
  • Loading branch information
keith committed Jan 10, 2023
1 parent 88c426e commit 9a0b847
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/test/collect_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ fi
cd $ROOT
# Call the C++ code coverage collection script.
if [[ "$CC_CODE_COVERAGE_SCRIPT" ]]; then
eval "${CC_CODE_COVERAGE_SCRIPT}"
if ! eval "${CC_CODE_COVERAGE_SCRIPT}"; then
echo "error: coverage collection script failed" >&2
exit 1
fi
fi

if [[ -z "$LCOV_MERGER" ]]; then
Expand Down

0 comments on commit 9a0b847

Please sign in to comment.