This is a simple set of scripts that makes it "easy" to generate coverage data for Rust unit tests, using grcov. These scripts include:
rustcov
: The top-level script to run in your project directory.genhtml
: Stolen from lcov, this needs to be in your PATH when you runrustcov
. MacOS brew users can usebrew install lcov
instead.wait-for
: A way to wait for another program. Stolen from eficode, but doesn't mess with an app's HOST or PORT environment.
In addition to rustup and cargo installed, you'll need to have the
nightly toolchain and grcov
installed.
rustup toolchain install nightly # for -Zprofile
cargo install grcov
The rustcov
script isn't that complex, so you should probably be able
to figure out what's going on yourself if you run it manually
step-by-step.