From 5880cc2a0f182ab8dd50eee02bbbe7d3dbc42b29 Mon Sep 17 00:00:00 2001 From: Perry Naseck Date: Mon, 26 Feb 2024 19:59:51 -0500 Subject: [PATCH 1/2] coverage workaround gcovr race parse bug --- Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 25d13bada..f3efd1ec0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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$$' \ @@ -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 From 69565aa18d576880b429ba28a0a3301334f7e002 Mon Sep 17 00:00:00 2001 From: Perry Naseck <4472083+DaAwesomeP@users.noreply.github.com> Date: Tue, 27 Feb 2024 20:26:37 -0500 Subject: [PATCH 2/2] Update Makefile.am Co-authored-by: Peter Newman --- Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index f3efd1ec0..1da6851cb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -272,9 +272,9 @@ COVERAGE_OUTPUTS = --txt coverage/coverage.txt \ --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$$' \ +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$$' \