Skip to content

Commit

Permalink
Merge pull request #1937 from DaAwesomeP/DaAwesomeP-fix-gcovr-parse-bug
Browse files Browse the repository at this point in the history
Workaround gcovr parse race condition bug
  • Loading branch information
peternewman committed Feb 28, 2024
2 parents 197e2f0 + 69565aa commit 4b0aae6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile.am
Expand Up @@ -271,8 +271,10 @@ COVERAGE_OUTPUTS = --txt coverage/coverage.txt \
--cobertura coverage/coverage.cobertura.xml \
--html-details coverage/details.html/coverage.details.html \
--coveralls coverage/coverage.coveralls.json
COVERAGE_GCOV_EXE=--gcov-executable /usr/bin/gcov
COVERAGE_FILTERS=-e '.*Test\.cpp$$' \
# 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$$' \
-e '.*\.pb\.cpp$$' \
-e '.*\.pb\.h$$' \
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 4b0aae6

Please sign in to comment.