taiki-e / cargo-llvm-cov

Cargo subcommand to easily use LLVM source-based code coverage (-C instrument-coverage).
Apache License 2.0
933 stars 57 forks source link

Add `cargo llvm-cov run` subcommand #68

Closed taiki-e closed 3 years ago

taiki-e commented 3 years ago

We already support test coverage for binary crate (https://github.com/taiki-e/cargo-llvm-cov/issues/1#issuecomment-857738242), but it would be nice if we could support another way as well.

Something like the following:

cargo llvm-cov run --html -- args...

with --no-report/--no-run

cargo llvm-cov run --no-report -- args... # run
cargo llvm-cov --no-report # test

cargo llvm-cov --no-run --html # merge run and test's coverage
taiki-e commented 3 years ago

I will probably need to decide how to handle Ctrl-C.

taiki-e commented 3 years ago

It seems ctrl-c also stops the generation of profile data. Therefore, there is nothing we can do about ctrl-c on our side at the moment.