Skip to content

Commit

Permalink
Merge pull request #1171 from google/reduce-quicker
Browse files Browse the repository at this point in the history
Slight reduction speedup.
  • Loading branch information
adetaylor authored Oct 20, 2022
2 parents 759970a + ea57ea7 commit 14f224f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/reduce/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,10 @@ fn create_interestingness_test(
// For the compile afterwards, we have to avoid including any system headers.
// We rely on equivalent content being hermetically inside concat.h.
let postcompile_step = make_compile_step(postcompile, "gen0.cc", extra_clang_args);
// -q below to exit immediately as soon as a match is found, to avoid
// extra compile/codegen steps
let problem_grep = problem
.map(|problem| format!("| grep \"{}\" >/dev/null 2>&1", problem))
.map(|problem| format!("| grep -q \"{}\" >/dev/null 2>&1", problem))
.unwrap_or_default();
let content = format!(
indoc! {"
Expand Down

0 comments on commit 14f224f

Please sign in to comment.