Remove always-on logging from fuzz targets (#878)

Now that the `cargo fuzz` tooling is better, it is easier to reproduce failures,
and we don't need to be super paranoid about logging here.
This commit is contained in:
Nick Fitzgerald
2020-01-30 23:46:50 +01:00
committed by GitHub
parent c6438d0d44
commit 84c4d8cc6c
7 changed files with 8 additions and 197 deletions

View File

@@ -1,27 +1,8 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
use std::sync::Once;
use wasmtime_fuzzing::{generators::api::ApiCalls, oracles};
fuzz_target!(|api: ApiCalls| {
static INIT_LOGGING: Once = Once::new();
INIT_LOGGING.call_once(|| env_logger::init());
log::debug!(
"If this fuzz test fails, here is a regression tests:
```
#[test]
fn my_regression_test() {{
use wasmtime_fuzzing::generators::{{
api::{{ApiCall::*, ApiCalls}},
WasmOptTtf,
}};
wasmtime_fuzzing::oracles::make_api_calls({:#?});
}}
```",
api
);
oracles::make_api_calls(api);
});