-
Notifications
You must be signed in to change notification settings - Fork 287
Add support for more than 9999 lines #883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for more than 9999 lines #883
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #883 +/- ##
=======================================
Coverage 95.27% 95.27%
=======================================
Files 54 54
Lines 4525 4525
Branches 893 893
=======================================
Hits 4311 4311
Misses 130 130
Partials 84 84 ☔ View full report in Codecov by Sentry. |
Test fails with: gcovr.formats.gcov.parser.UnknownLineType: 1326:10000-block 0
8df9e2b to
94bafb8
Compare
|
Instead of using an end-to-end test case with a file containing over 10k lines, it might be sufficient to just test this on the gcov parser level and add an example to the parser's doctests. Something like: >>> _parse_line(" %%%%%:12345-block 0") # see https://github.com/gcovr/gcovr/issues/882
_BlockLine(hits=0, lineno=12345, blockno=0, extra_info=NONE)As a general point, the gcovr test suite is fairly detailed but also extremely slow, and maintaining the "golden master" files is tedious (especially for XML and HTML formats). Wherever we can check something via a cheap unit test, we should prefer that. One thing I've wanted to do (when I have the energy, so probably never) would be to review the test suite, remove tests for formats that aren't needed (so probably preferring JSON tests over HTML tests when testing reader functionality, preferring JSON inputs over running gcov when testing writer-side functionality), porting Makefiles to Python test modules to reduce re-building and process spawning overhead, and maybe even finding a way to use pytest-xdist for parallelization. Once there are fewer golden master files, it would also be easier to drop ancient GCC versions. |
I'll update this.
In this case we should also consider to remove the makefiles and use a python based test configuration. I was also thinking about this change. |
7be01bb to
d025c7c
Compare
Already fixed upstream (gcovr/gcovr#883), so future versions of gcovr should work fine.
Already fixed upstream (gcovr/gcovr#883), so future versions of gcovr should work fine.
If more than 9999 code lines are present there is no space in front of the block number printed by gcov. Add support for optional spaces.
Closes #882