I am currently trying to measure our code coverage using the
source-based-code-coverage in a project with rust and c source code.
If I add the sources argument to "cargo cov -- show", I only get the covered c files (no rust files shown at all). This might be a bug in llvm-cov (?).
edit: the above was not true, but the behaviour is very odd. e.g. I cannot just filter by the common parent directory. And if I just filter by the sub directory with the rust code, I also get dependencies and stuff outside of this directory.
I guess, I can adapt the build.rs to only instrument my own c code (That would solve the problem for the c dependencies).
Can I pass the
-Zinstrument-coverage only to my own code somehow?
If I add it to the RUSTFLAGS or the [build]-section, it gets applied to all rust sources (including the dependencies, that I do not want to check).
Thanks for your help.