mozilla / grcov

Rust tool to collect and aggregate code coverage data for multiple source files
Mozilla Public License 2.0
1.15k stars 148 forks source link

grcov gives an error to open some unknown file #1185

Open ns-pjasani opened 3 weeks ago

ns-pjasani commented 3 weeks ago

I am trying to generate test coverage report using grcov in rust.

When I execute ~/.cargo/bin/grcov . --binary-path target/debug -s . -t html --branch --filter covered -o target/debug/coverage,

It gives an error as below: A panic occurred at /path/.cargo/registry/src/index.crates.io-6f17d22bba15001f/grcov-0.8.19/src/producer.rs:174: Failed to open '/path/./some-file/db/user_defined'

Though ./some-file/db/user_defined file is not present in my project.

In my other rust project, it is working fine. Only in this project, I am getting this error.

I am using grcov-v0.8.19 and rust nightly-2024-02-20.

Could anyone please help me with the solution ?