trailofbits / test-fuzz

To make fuzzing Rust easy

Home Page:https://crates.io/crates/test-fuzz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add `--release` flag

smoelius opened this issue · comments

I think five steps are necessary:

  1. Modify the TestFuzzWithDeprecations struct to add the --release flag:
    struct TestFuzzWithDeprecations {
  2. Add a release field to this TestFuzz struct:
    pub struct TestFuzz {
  3. Modify this From implementation to set the release field in the TestFuzz struct when that field is set in the TestFuzzWithDeprecations struct:
    impl From<TestFuzzWithDeprecations> for super::TestFuzz {
  4. Modify the build function so that it checks whether the release field is set, and adds --release to the flags passed to cargo when it is:
    fn build(opts: &TestFuzz, quiet: bool) -> Result<Vec<Executable>> {
  5. Update the "Usage" section in the README: https://github.com/trailofbits/test-fuzz/blob/master/README.md#usage