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

Error: NaN is less than min_coverage 95 - Unexpected NaN coverage value #146

Closed
Archie-Elvie opened this issue May 31, 2022 · 5 comments
Closed
Assignees
Labels
won't fix This will not be worked on

Comments

@Archie-Elvie
Copy link

Describe the bug
While running the action it reports NaN coverage, while lcov it self reports 100%.

Reading tracefile code-coverage/lcov.info
            |Lines       |Functions  |Branches    
Filename    |Rate     Num|Rate    Num|Rate     Num
==================================================
[/workspaces/project/src/]
bar.cpp     | 100%      4| 100%     2|    -      0
==================================================
      Total:| 100%      4| 100%     2|    -      0

To Reproduce
Steps to reproduce the behaviour:

Use the following lcov.info

lcov.info

TN:
SF:/__w/project/project/src/bar.cpp
FN:3,_Z8set_gpioPK6devicehi
FNDA:2,_Z8set_gpioPK6devicehi
FN:8,_Z3addii
FNDA:2,_Z3addii
DA:3,2
DA:5,2
DA:8,2
DA:10,2
end_of_record

Expected behavior
It reports 100% and passes

Screenshots
None

Additional context
None

Let me know if you need more information.

@alestiago
Copy link
Contributor

Thanks for the issue @Archie-Elvie , sorry for the late reply. Is this still an issue?

@Archie-Elvie
Copy link
Author

Yeah I still get NaN whenever I try and use it

@alestiago alestiago self-assigned this Mar 14, 2023
@alestiago
Copy link
Contributor

I've been able to reproduce this issue on v2.1.0.

A sample can be found here and a pull request with the action failing here.

@alestiago
Copy link
Contributor

alestiago commented Mar 16, 2023

@Archie-Elvie by any chance do you have a reference to the exact tool you're using to generate the lcov file and the tool you are using to report the lcov file result?

@alestiago alestiago added the waiting for response Waiting for follow up label Mar 16, 2023
@renancaraujo renancaraujo added won't fix This will not be worked on and removed waiting for response Waiting for follow up labels May 2, 2023
@renancaraujo
Copy link
Contributor

It seems like this is an invalid lcov file, at least from the parser standpoint. There is no data on found/hit for functions and lines, which we use for calculating code coverage.

Closing as a wontfix since there is not much we can do here in this case with the info we have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
won't fix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants