Skip to content

Commit

Permalink
coverage workaround gcovr race parse bug
Browse files Browse the repository at this point in the history
  • Loading branch information
DaAwesomeP committed Feb 27, 2024
1 parent 197e2f0 commit 5880cc2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ COVERAGE_OUTPUTS = --txt coverage/coverage.txt \
--cobertura coverage/coverage.cobertura.xml \
--html-details coverage/details.html/coverage.details.html \
--coveralls coverage/coverage.coveralls.json
# See https://gcovr.com/en/stable/guide/gcov_parser.html#negative-hit-counts
COVERAGE_FLAGS=--gcov-ignore-parse-errors=negative_hits.warn_once_per_file
COVERAGE_GCOV_EXE=--gcov-executable /usr/bin/gcov
COVERAGE_FILTERS=-e '.*Test\.cpp$$' \
-e '.*\.pb\.cc$$' \
Expand All @@ -287,7 +289,7 @@ if !BUILD_GCOV
else
if FOUND_GCOVR
mkdir -p coverage/details.html/
gcovr --print-summary $(COVERAGE_OUTPUTS) $(COVERAGE_GCOV_EXE) --root . $(COVERAGE_FILTERS)
gcovr $(COVERAGE_FLAGS) --print-summary $(COVERAGE_OUTPUTS) $(COVERAGE_GCOV_EXE) --root . $(COVERAGE_FILTERS)
else
$(error gcovr not found. Install gcovr (e.g. via pip for the latest version) and re-run configure.)
endif
Expand Down

0 comments on commit 5880cc2

Please sign in to comment.