Closed tcztzy closed 2 years ago
Are both source-based coverage and gcov-based coverage failing?
Before running cargo test
, can you make sure you remove all .profraw and .gcda files that are in your source tree?
cargo build
cargo test
grcov
If it still fails, can you try running grcov PATHTOPROFRAW1 PATHTOPROFRAW2 ... -s .
instead of grcov . -s .
?
I got the same problem, and I just tried what you asked: remove, guild, test, grcov
I found a temporary solution:
Open the CMD with Administrator right
Yes, me too, it's urgent to fixt it, right ?
@corebreaker does the workaround @lolo32 suggested work for you?
i found a better one, i used tarpaulin instead, plus too many problem with grcov, some line should be covered (like empty lines with no code around), tarpaulin didn't make these error. Lcov works better but tarpaulin is easier.
Strange, there shouldn't be any difference in coverage results between lcov and grcov when using gcov-based coverage. The coverage instrumentation is in Rust itself. If you have a reproducible example, please file a new issue.
Tarpaulin is very different as it uses a custom instrumentation, not the standard one in the Rust compiler, and as far as I can tell it doesn't support Windows.
All in all, you should get the best results with source-based coverage and grcov (lcov doesn't support source-based coverage).
Duplicate of #462.
I followed the manual from README, both
.profraw
and.gcda
. And then I try to run following command to generate coverage report have the same panicI also read this issure, but I need some Windows specified dependecies so I do pin
nightly-msvc
.Is there any walkaround for this problem?