kennytm / cargo-kcov

Cargo subcommand to run kcov to get coverage report on Linux
127 stars 19 forks source link

Support for --package argument as a pass-trough to cargo #18

Closed jchlapinski closed 7 years ago

jchlapinski commented 7 years ago

I have a project with main crate and some nested crated that use workspace = ".." in respective Cargo.toml. I can run tests for each individual nested crate from the main project dir with cargo test --package=<crate-name>. I cannot however run cargo kcov in similar fashion - to check coverage for a single nested crate.

Of course I can run cargo from the nested crate directory, however because of workspace = "..", cargo exits with an error

error: root of a workspace inferred but wasn't a root

Could perhaps cargo-kcov support --package argument to solve this problem?

Regards

jchlapinski commented 7 years ago

Sorry, I had an incorrectly configured workspace in my Cargo.toml