Skip to content

Commit 6631dd9

Browse files
Don't stop test if llvm FileCheck cannot be found
1 parent 87a704a commit 6631dd9

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

build_system/src/test.rs

+15-13
Original file line numberDiff line numberDiff line change
@@ -524,23 +524,25 @@ fn setup_rustc(env: &mut Env, args: &TestArg) -> Result<(), String> {
524524
Ok(cargo)
525525
}
526526
})?;
527-
let llvm_filecheck = String::from_utf8(
528-
run_command_with_env(
529-
&[
530-
&"bash",
531-
&"-c",
532-
&"which FileCheck-10 || \
527+
let llvm_filecheck = match run_command_with_env(
528+
&[
529+
&"bash",
530+
&"-c",
531+
&"which FileCheck-10 || \
533532
which FileCheck-11 || \
534533
which FileCheck-12 || \
535534
which FileCheck-13 || \
536535
which FileCheck-14",
537-
],
538-
rust_dir,
539-
Some(env),
540-
)?
541-
.stdout,
542-
)
543-
.map_err(|error| format!("Failed to retrieve LLVM FileCheck: {:?}", error))?;
536+
],
537+
rust_dir,
538+
Some(env),
539+
) {
540+
Ok(cmd) => String::from_utf8_lossy(&cmd.stdout).to_string(),
541+
Err(_) => {
542+
eprintln!("Failed to retrieve LLVM FileCheck, ignoring...");
543+
String::new()
544+
}
545+
};
544546
std::fs::write(
545547
"rust/config.toml",
546548
&format!(

0 commit comments

Comments
 (0)