Ignore zpp in gcovr#21623
Merged
iluuu1994 merged 1 commit intophp:masterfrom Apr 3, 2026
Merged
Conversation
The ZPP macros materialize into optimized code with many error branches that aren't useful to test for every function. Ignore these lines completely by using the gcovr --exclude-lines-by-pattern flag. For codecov to pick up on this change, we generate the xml file manually and point to it in the codecov action. Also move the ignore paths from codecov.yml to Makefile.gcov.
Member
Author
|
Finally found a solution for this issue. Increased coverage from 54% to 66%. https://app.codecov.io/gh/php/php-src/tree/master There's likely many other places where macros with branches aren't tested. Converting them to inlined functions should work (where possible). |
TimWolla
approved these changes
Apr 3, 2026
mvorisek
reviewed
Apr 3, 2026
| 'ext/mbstring/libmbfl/.*' \ | ||
| 'ext/pcre/pcre2lib/.*' | ||
| 'ext/pcre/pcre2lib/.*' \ | ||
| 'ext/uri/uriparser/.*' |
Contributor
There was a problem hiding this comment.
Shouldn't the uriparser bundled lib be also excluded from LCOV?
Would you like to be this automatized, ie. exclude all bundled sources, by CI?
Member
Author
There was a problem hiding this comment.
lcov is currently broken, and honestly I'm not sure it even makes sense to maintain two tools.
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.
The ZPP macros materialize into optimized code with many error branches that aren't useful to test for every function. Ignore these lines completely by using the gcovr --exclude-lines-by-pattern flag. For codecov to pick up on this change, we generate the xml file manually and point to it in the codecov action. Also move the ignore paths from codecov.yml to Makefile.gcov.