From 39840b53931d590fb13ddbf31f855edcf382fd68 Mon Sep 17 00:00:00 2001 From: Rene Cannao Date: Tue, 24 Mar 2026 16:10:56 +0000 Subject: [PATCH] Exclude /usr and deps from coverage reports fastcov was including system headers (/usr/include/c++/...) and vendored dependencies (deps/json/json.hpp) in coverage output. Use --exclude instead of --include since project source files have bare filenames in gcov output (no path prefix to match against), while system/deps paths are always absolute. --- test/infra/control/run-multi-group.bash | 1 + test/infra/control/run-tests-isolated.bash | 1 + 2 files changed, 2 insertions(+) diff --git a/test/infra/control/run-multi-group.bash b/test/infra/control/run-multi-group.bash index 73ec992ee..13fc21c65 100755 --- a/test/infra/control/run-multi-group.bash +++ b/test/infra/control/run-multi-group.bash @@ -360,6 +360,7 @@ if [ "${COVERAGE}" -eq 1 ]; then if command -v fastcov >/dev/null 2>&1; then cd "${GCOV_DIR}" fastcov -b -j4 -l \ + -e /usr deps \ -d . -o "${GROUP_INFO}" >> "${COVERAGE_LOG}" 2>&1 || \ echo ">>> WARNING: fastcov failed for ${GCOV_DIR}" >> "${COVERAGE_LOG}" fi diff --git a/test/infra/control/run-tests-isolated.bash b/test/infra/control/run-tests-isolated.bash index 7e2f9c7bf..aa3e87efb 100755 --- a/test/infra/control/run-tests-isolated.bash +++ b/test/infra/control/run-tests-isolated.bash @@ -312,6 +312,7 @@ docker run \ echo \">>> Running fastcov on /gcov...\" cd /gcov fastcov -b -j\$(nproc) -l \ + -e /usr deps \ -d . -o \"\${coverage_file}\" >> \"\${coverage_log}\" 2>&1 || echo \">>> WARNING: Coverage generation failed (see \${coverage_log})\" if [ -f \"\${coverage_file}\" ]; then