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

Discrepancy with genhtml #26

Open
letmaik opened this issue Feb 23, 2017 · 1 comment
Open

Discrepancy with genhtml #26

letmaik opened this issue Feb 23, 2017 · 1 comment

Comments

@letmaik
Copy link

letmaik commented Feb 23, 2017

When I generate an HTML report with genhtml I get 5623/7013 lines covered in total, which is 80%.

Looking at the xml file produced by this library the root entry has lines-covered="10233" lines-valid="23111", which is 44%.

How can such a situation occur?

@Natsuki-gh
Copy link

I have found a discrepancy where the xml and genhtml have a difference about paths taken.
With genhtml all lines in my function were executed however in the lcov-to-cobertura-xml not all lines were so marked.
looking at the info file there are multiple SF records for the same file:
SF:/code/example.c
...
DA:100,1
DA:101,1
end_of_record
SF:/code/example.c
...
DA:100,0
DA:101,0
end_of_record
The python script line clears file_lines every SF record. This then replaces file_dict['lines'] at line 120 on end_of_record.
i.e. the information is from the last SF record and the information from the previous SF records is lost.
I suspect the processing of end_of_record needs to integrate the new data with the existing.

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