@@ -4,9 +4,11 @@ use std::ffi::OsString;
44use std:: num:: NonZeroUsize ;
55use std:: path:: { Path , PathBuf } ;
66use std:: { env, process:: Command } ;
7- use ui_test:: color_eyre:: eyre:: Context ;
8- use ui_test:: { color_eyre:: Result , Config , Match , Mode , OutputConflictHandling } ;
9- use ui_test:: { status_emitter, CommandBuilder , Format , RustfixMode } ;
7+ use ui_test:: color_eyre:: eyre:: { Context , Result } ;
8+ use ui_test:: {
9+ status_emitter, CommandBuilder , Config , Format , Match , Mode , OutputConflictHandling ,
10+ RustfixMode ,
11+ } ;
1012
1113fn miri_path ( ) -> PathBuf {
1214 PathBuf :: from ( option_env ! ( "MIRI" ) . unwrap_or ( env ! ( "CARGO_BIN_EXE_miri" ) ) )
@@ -125,6 +127,9 @@ fn run_tests(
125127 // Let the tests know where to store temp files (they might run for a different target, which can make this hard to find).
126128 config. program . envs . push ( ( "MIRI_TEMP" . into ( ) , Some ( tmpdir. to_owned ( ) . into ( ) ) ) ) ;
127129
130+ // If a test ICEs, we want to see a backtrace.
131+ config. program . envs . push ( ( "RUST_BACKTRACE" . into ( ) , Some ( "1" . into ( ) ) ) ) ;
132+
128133 // Handle command-line arguments.
129134 let args = ui_test:: Args :: test ( ) ?;
130135 let default_bless = env:: var_os ( "RUSTC_BLESS" ) . is_some_and ( |v| v != "0" ) ;
@@ -224,7 +229,7 @@ fn ui(
224229 with_dependencies : Dependencies ,
225230 tmpdir : & Path ,
226231) -> Result < ( ) > {
227- let msg = format ! ( "## Running ui tests in {path} against miri for {target}" ) ;
232+ let msg = format ! ( "## Running ui tests in {path} for {target}" ) ;
228233 eprintln ! ( "{}" , msg. green( ) . bold( ) ) ;
229234
230235 let with_dependencies = match with_dependencies {
0 commit comments