Comments you submit will be routed for moderation. If you have an account, please log in first.

Ticket #3879 (closed defect: duplicate)

Opened 8 years ago

Last modified 8 years ago

source files with zero coverage are not included in the coverage report

Reported by: anonymous Owned by: wehart
Priority: normal Milestone:
Component: gcovr Version:
Keywords: Cc:


This happens because no '.gcda' files were created for those files.
This can be fixed by changing 'gcda' to 'gcno' in 'def get_datafiles(flist, options, ext="gcda")'.

Note that missing sources with zero coverage from our report would defeat the purpose of measuring test coverage.

I would consider changing 'gcda' to 'gcno' by default. Or you could add a command line option like '--include-non-executed-files'.



Change History

comment:1 Changed 8 years ago by anonymous

Should this extend also to files that were not compiled?
( c and/or h files that are missing gcno )

comment:2 Changed 8 years ago by wehart

I don't think that gcov will generate data for non-compiled files. I don't see a simple work-around for this.

comment:3 Changed 8 years ago by jdsiiro

  • Status changed from new to closed
  • Resolution set to duplicate
  • Component changed from EXACT to gcovr

Duplicate of #3887.

Closing this (older) ticket because #3887 contains a patch and has external followers.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.