Rollup merge of #138999 - jieyouxu:spellout-pass-mode, r=wesleywiser
Report compiletest pass mode if forced This is very non-obvious if it fails in PR CI, because the starting invocation is miles away from the final test suite outcome.
This commit is contained in:
commit
ed752193cc
1 changed files with 17 additions and 12 deletions
|
@ -22,6 +22,7 @@ pub mod util;
|
||||||
use core::panic;
|
use core::panic;
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
|
use std::fmt::Write;
|
||||||
use std::io::{self, ErrorKind};
|
use std::io::{self, ErrorKind};
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::process::{Command, Stdio};
|
use std::process::{Command, Stdio};
|
||||||
|
@ -570,18 +571,22 @@ pub fn run_tests(config: Arc<Config>) {
|
||||||
// easy to miss which tests failed, and as such fail to reproduce
|
// easy to miss which tests failed, and as such fail to reproduce
|
||||||
// the failure locally.
|
// the failure locally.
|
||||||
|
|
||||||
println!(
|
let mut msg = String::from("Some tests failed in compiletest");
|
||||||
"Some tests failed in compiletest suite={}{} mode={} host={} target={}",
|
write!(msg, " suite={}", config.suite).unwrap();
|
||||||
config.suite,
|
|
||||||
config
|
if let Some(compare_mode) = config.compare_mode.as_ref() {
|
||||||
.compare_mode
|
write!(msg, " compare_mode={}", compare_mode).unwrap();
|
||||||
.as_ref()
|
}
|
||||||
.map(|c| format!(" compare_mode={:?}", c))
|
|
||||||
.unwrap_or_default(),
|
if let Some(pass_mode) = config.force_pass_mode.as_ref() {
|
||||||
config.mode,
|
write!(msg, " pass_mode={}", pass_mode).unwrap();
|
||||||
config.host,
|
}
|
||||||
config.target
|
|
||||||
);
|
write!(msg, " mode={}", config.mode).unwrap();
|
||||||
|
write!(msg, " host={}", config.host).unwrap();
|
||||||
|
write!(msg, " target={}", config.target).unwrap();
|
||||||
|
|
||||||
|
println!("{msg}");
|
||||||
|
|
||||||
std::process::exit(1);
|
std::process::exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue