Skip to content

Commit

Permalink
Fix pass/fail reporting in coverage script
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyGrosser committed Dec 19, 2023
1 parent 3d1a59d commit d5ed1f4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,12 @@ COVERAGE_FLAGS=" \

gnatcov coverage --annotate=xcov+ ${COVERAGE_FLAGS}
gnatcov coverage --annotate=html+ ${COVERAGE_FLAGS}
echo "PASS" 1>&2

let ok=$(grep --text '^FAIL ' coverage.log | wc -l)
let failed=$(grep --text '^FAIL ' coverage.log | wc -l)
let errors=$(grep --text '^ERROR ' coverage.log | wc -l)
if [ $ok -gt 0 -a $failed -eq 0 -a $errors -eq 0 ]; then
echo "PASS" 1>&2
else
echo "FAIL" 1>&2
fi

0 comments on commit d5ed1f4

Please sign in to comment.