Daily Test Coverage Improver: Fix coverage report generation#7886
Merged
Daily Test Coverage Improver: Fix coverage report generation#7886
Conversation
- Add --merge-mode-functions=separate flag to all gcovr commands - Resolves AssertionError with C++ template destructors on multiple lines - Fixes coverage HTML and text report generation - Coverage reports now generate successfully without merge conflicts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes the coverage report generation issue identified in the Daily Test Coverage Improver workflow. The problem was that
gcovrwas failing with merge conflicts when processing C++ template destructors that appeared on multiple lines.Problem Found
The coverage steps were failing with this error:
Actions Taken
--merge-mode-functions=separateflag to all threegcovrcommands in the coverage actionChanges in Test Coverage Achieved
**(redacted) Coverage report generation completely failed - no reports generated
**(redacted) Coverage reports generate successfully, showing data like:
build/src/ackermannization/ackermannization_params.hpp: 50% coverage (3/6 lines)build/src/api/dll/gparams_register_modules.cpp: 100% coverage (58/58 lines)build/src/params/sat_params.hpp: 98% coverage (193/197 lines)This fix enables proper measurement and improvement of test coverage across the Z3 codebase.
Validation Commands
To validate the fix works:
Future Improvement Areas
Based on the initial coverage data, areas for future test improvement include:
build/src/api/api_commands.cpp: 0% coverage)build/src/api/api_log_macros.cpp: 0% coverage)build/src/math/realclosure/rcf_params.hpp: 0% coverage)<details>
<summary>Workflow Details</summary>
Bash Commands Run
git checkout -b fix-coverage-merge-modegcovr --merge-mode-functions=separate --gcov-ignore-parse-errors --gcov-executable "llvm-cov gcov" . 2>&1 | head -20git add .github/actions/daily-test-improver/coverage-steps/action.ymlgit commit --author "Daily Test Coverage Improver <github-actions[bot]@users.noreply.github.com>" -m "Fix coverage report generation with merge-mode-functions=separate"Web Searches Performed
None
Web Pages Fetched
None
</details>
> AI-generated content by Daily Test Coverage Improver may contain mistakes.