Skip to content
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

Processing lcov output en masse #2

Open
caa-energid opened this issue Jun 24, 2020 · 2 comments
Open

Processing lcov output en masse #2

caa-energid opened this issue Jun 24, 2020 · 2 comments

Comments

@caa-energid
Copy link

As an alternative to using gcov repeatedly for every source dir / file in our project, we run coverage reports using a combination of lcov and genhtml. In order to produce reports via Cobertura (or simple HTML reports), we use the gcovr python utility.

We have a use case for which the covpare utility but it would be helpful if we could get some direction on how best to utilize the info file that is generated by lcov.

@sdarwin
Copy link

sdarwin commented Dec 8, 2022

Also facing this question. So far we are using lcov, genhtml, and gcovr, and not gcov directly.
In order to leverage covpare, is it correct that you must run gcov instead of lcov? and not just all at once (en masse), but individually a thousand time?

Another question: we'd like to diff pull requests, and observe if the pull request is causing more or less code coverage (similar to a codecov chart). That means, comparing coverage from two sets of similar (but not identical) files. Because a pull request might be adding or removing files, functions, lines, etc.

This coverage diff program https://github.com/capgelka/lcov-diff at first appeared to be applicable. However, lcov-diff is designed to be run on the exact same set of target code files, and compare different test suites, if that makes any sense. It won't work when comparing a pull request against a main branch. Because, again, a pull request might be adding, removing or changing files, or lines in files. That breaks lcov-diff.

How about covpare? Is it designed to compare one set of source code files against varying test suites, or could it compare a pull request, where "everything" is potentially being modified?

@sdarwin
Copy link

sdarwin commented Dec 8, 2022

About that other topic I brought up "diff pull requests", it appears gcovr --json-summary will output coverage data as json, and from there it shouldn't be overly difficult to run comparisons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants