Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions src/tools/compiletest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pub mod util;
use core::panic;
use std::collections::HashSet;
use std::ffi::OsString;
use std::fmt::Write;
use std::io::{self, ErrorKind};
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};
Expand Down Expand Up @@ -570,18 +571,22 @@ pub fn run_tests(config: Arc<Config>) {
// easy to miss which tests failed, and as such fail to reproduce
// the failure locally.

println!(
"Some tests failed in compiletest suite={}{} mode={} host={} target={}",
config.suite,
config
.compare_mode
.as_ref()
.map(|c| format!(" compare_mode={:?}", c))
.unwrap_or_default(),
config.mode,
config.host,
config.target
);
let mut msg = String::from("Some tests failed in compiletest");
write!(msg, " suite={}", config.suite).unwrap();

if let Some(compare_mode) = config.compare_mode.as_ref() {
write!(msg, " compare_mode={}", compare_mode).unwrap();
}

if let Some(pass_mode) = config.force_pass_mode.as_ref() {
write!(msg, " pass_mode={}", pass_mode).unwrap();
}

write!(msg, " mode={}", config.mode).unwrap();
write!(msg, " host={}", config.host).unwrap();
write!(msg, " target={}", config.target).unwrap();

println!("{msg}");

std::process::exit(1);
}
Expand Down
Loading