Skip to content

chaaz/rust_coverage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Coverage Scripts

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 run rustcov. MacOS brew users can use brew 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.

Requirements

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

Troubleshooting

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.

About

Some tools to cover rust unit tests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published