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

feature request: add option to report zero coverage for files that were not executed #154

Closed
mambu opened this issue Sep 28, 2016 · 1 comment

Comments

@mambu
Copy link

@mambu mambu commented Sep 28, 2016

Hi,

currently files that have a gcno but no gcda associated are not considered into the final report. However, they indicate a file that has never been executed so it is good to know it.
Would it be possible to have an option to include those files in the final report with zero coverage?

Here is the output from gcovr (modified to print the error returned from gcov - prepended with "MAMBU"):

Scanning directory . for gcda/gcno files...
Found 415 files (and will process 347)
Processing file: /home/mambu/temp/fhcore-gcov/debug64/obj/libDepthKeyExpr.solibDepthKeyExpr.a/SortString.gcno
Running gcov: 'gcov /home/mambu/temp/fhcore-gcov/debug64/obj/libDepthKeyExpr.solibDepthKeyExpr.a/SortString.gcno --branch-counts --branch-probabilities --preserve-paths --object-directory /home/mambu/temp/fhcore-gcov/debug64/obj/libDepthKeyExpr.solibDepthKeyExpr.a' in '/home/mambu/temp/fhcore-gcov'
MAMBU - Err /home/mambu/temp/fhcore-gcov/debug64/obj/libDepthKeyExpr.solibDepthKeyExpr.a/SortString.gcda:cannot open data file, assuming not executed
Processing file: /home/mambu/temp/fhcore-gcov/debug64/obj/ValidateFH/ValidateFhTrValidation.gcno
Running gcov: 'gcov /home/mambu/temp/fhcore-gcov/debug64/obj/ValidateFH/ValidateFhTrValidation.gcno --branch-counts --branch-probabilities --preserve-paths --object-directory /home/mambu/temp/fhcore-gcov/debug64/obj/ValidateFH' in '/home/mambu/temp/fhcore-gcov'
MAMBU - Err /home/mambu/temp/fhcore-gcov/debug64/obj/ValidateFH/ValidateFhTrValidation.gcda:cannot open data file, assuming not executed

As you can see there is indication that the gcna was not found (and therefore the code not executed).

Thanks,
Marco

@latk

This comment has been minimized.

Copy link
Member

@latk latk commented Mar 6, 2018

I think this is the same issue as #100. Thank you for reporting this feature request, I agree that such a feature would be useful. However, this is probably nontrivial as the source file location is parsed from the gcov file, which gcov doesn't write in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.