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

LCOV output started reporting way too small numbers (while Markdown output shows the expected ones) #1239

Open
hartwork opened this issue Nov 1, 2024 · 1 comment

Comments

@hartwork
Copy link

hartwork commented Nov 1, 2024

Hello!

At some point in time LCOV output started reporting way too small numbers while the Markdown output shows the expected ones. Here is proof and more information:

Markdown output, as expected

$ grcov --binary-path target/debug --source-dir src --ignore '/*' --branch --llvm-path /usr/bin -t markdown -o target/coverage/summary.md .
$ cat target/coverage/summary.md
| file                   | coverage | covered   | missed_lines       |
|------------------------|----------|-----------|--------------------|
| command_line_parser.rs | 100.00%  | 152 / 152 |                    |
| exec.rs                | 100.00%  | 57 / 57   |                    |
| main.rs                | 97.65%   | 208 / 213 | 38, 75, 81, 85, 99 |
| network.rs             | 100.00%  | 157 / 157 |                    |
| logging.rs             | 97.56%   | 160 / 164 | 63-65, 103         |

Total coverage: 98.79%

LCOV output, broken

$ grcov --binary-path target/debug --source-dir src --ignore '/*' --branch --llvm-path /usr/bin -t lcov -o target/coverage/lcov .
$ lcov --list target/coverage/lcov
                              |Lines       |Functions  |Branches    
Filename                      |Rate     Num|Rate    Num|Rate     Num
====================================================================
[/]
command_line_parser.rs        | 7.2%    152| 0.0%    11|    -      0
exec.rs                       |12.3%     57| 0.0%     7|    -      0
logging.rs                    |22.0%    159| 0.0%    33|    -      0
main.rs                       |21.2%    208| 0.0%    44|    -      0
network.rs                    | 7.6%    157| 0.0%    12|    -      0
====================================================================
                        Total:|14.9%    733| 0.0%   107|    -      0

Additional info

Best, Sebastian

@marco-c
Copy link
Collaborator

marco-c commented Nov 5, 2024

@hartwork could you try with older grcov versions, so we can figure out what caused this?

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