Skip to content

Commit 575b63f

Browse files
committed
Make CC_CODE_COVERAGE_SCRIPT failures fail tests
If you're editing, or overriding, this script and you introduce and introduce an error, previously this wouldn't fail the test invocation.
1 parent 45f4628 commit 575b63f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/test/collect_coverage.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ fi
175175
cd $ROOT
176176
# Call the C++ code coverage collection script.
177177
if [[ "$CC_CODE_COVERAGE_SCRIPT" ]]; then
178-
eval "${CC_CODE_COVERAGE_SCRIPT}"
178+
if ! eval "${CC_CODE_COVERAGE_SCRIPT}"; then
179+
echo "error: coverage collection script failed" >&2
180+
exit 1
181+
fi
179182
fi
180183

181184
if [[ -z "$LCOV_MERGER" ]]; then

0 commit comments

Comments
 (0)