Skip to content

Commit

Permalink
Merge pull request #86 from srlabs/minimize-build
Browse files Browse the repository at this point in the history
Add build command before minimize
  • Loading branch information
louismerlin authored Jan 18, 2024
2 parents 9c7614c + ab39ed8 commit 1470652
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/bin/cargo-ziggy/minimize.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
use crate::{find_target, FuzzingEngines, Minimize};
use crate::{find_target, Build, FuzzingEngines, Minimize};
use anyhow::{Context, Result};
use std::{env, fs::File, process, thread, time::Duration};

impl Minimize {
pub fn minimize(&mut self) -> Result<(), anyhow::Error> {
let build = Build {
no_afl: self.engine == FuzzingEngines::Honggfuzz,
no_honggfuzz: self.engine == FuzzingEngines::AFLPlusPlus,
};
build.build().context("Failed to build the fuzzers")?;

self.target =
find_target(&self.target).context("⚠️ couldn't find target when minimizing")?;

Expand Down

0 comments on commit 1470652

Please sign in to comment.