Open dbarbosapn opened 6 months ago
But, when the file is clicked, all lines and regions are covered.
I have not yet checked the reproduction locally, but I suspect this is the same problem as https://github.com/taiki-e/cargo-llvm-cov/issues/324.
EDIT: I will not be able to reproduce the problem locally as a complete reproduction is not provided in the first place.
I suspect this is the same problem as #324.
Ah, nah, maybe another issue is involved because the line coverage is also affected.
In any case, I think we need a complete reproduction, including what is tested in trybuild.
I uploaded https://github.com/PollRobots/min-repo
If I run
cargo llvm-cov --open
I can see that all tests run and succeed, including trybuild tests that verify each error branch in the macro. But in the coverage report the error branches are clearly labeled as not taken
@taiki-e hi, is this something that you will have time to look at?
Hello,
I'm seeing some big discrepancies in code coverage when testing proc macros with trybuild.
Crate structure: ├── src │ ├── lib.rs ├── tests │ ├── testcases │ │ ├── fail │ │ │ ├── will_fail.rs │ │ │ ├── will_fail.stderr │ │ ├── pass │ │ │ ├── will_pass.rs │ ├── tests.rs
The content of tests.rs is:
The content of lib.rs is:
This is what workspace coverage is reporting: But, when the file is clicked, all lines and regions are covered.
This is affecting our CI gates so we'll have to exclude macros from coverage, but would love to get some help on this.
Additional details:
--show-missing-lines
, it reports the same coverage issue, but no lines are reported as uncovered.Thanks in advance!