Skip to content

Commit

Permalink
Fix tests and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
louismerlin committed Dec 5, 2024
1 parent 1ad3514 commit 27db505
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/bin/cargo-ziggy/minimize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ impl Minimize {
find_target(&self.target).context("⚠️ couldn't find target when minimizing")?;

if fs::read_dir(self.output_corpus()).is_ok() {
return Err(anyhow!("Directory {} exists, please move it before running minimization", self.output_corpus()));
return Err(anyhow!(
"Directory {} exists, please move it before running minimization",
self.output_corpus()
));
}

let entries = fs::read_dir(self.input_corpus())?;
Expand Down
6 changes: 3 additions & 3 deletions tests/url_fuzz.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::{
env,
env, fs,
path::PathBuf,
process, thread,
time::{Duration, SystemTime, UNIX_EPOCH},
Expand Down Expand Up @@ -120,6 +120,8 @@ fn integration() {
.join("minimization_afl.log")
.is_file());

fs::remove_dir_all(temp_dir_path.join("url-fuzz").join("corpus_minimized")).unwrap();

// cargo ziggy minimize -e honggfuzz
let minimization = process::Command::new(&cargo_ziggy)
.arg("ziggy")
Expand All @@ -137,7 +139,6 @@ fn integration() {
.join("minimization_honggfuzz.log")
.is_file());

/* Removed until https://github.com/mozilla/grcov/issues/1240 has a fix
// cargo ziggy cover
let coverage = process::Command::new(&cargo_ziggy)
.arg("ziggy")
Expand All @@ -153,7 +154,6 @@ fn integration() {
.join("coverage")
.join("index.html")
.is_file());
*/

// cargo ziggy plot
let plot = process::Command::new(&cargo_ziggy)
Expand Down

0 comments on commit 27db505

Please sign in to comment.