@@ -17,10 +17,10 @@ use crate::json;
1717use crate :: read2:: { read2_abbreviated, Truncated } ;
1818use crate :: util:: { add_dylib_path, dylib_env_var, logv, PathBufExt } ;
1919use crate :: ColorConfig ;
20+ use colored:: Colorize ;
2021use miropt_test_tools:: { files_for_miropt_test, MiroptTest , MiroptTestFile } ;
2122use regex:: { Captures , Regex } ;
2223use rustfix:: { apply_suggestions, get_suggestions_from_json, Filter } ;
23-
2424use std:: collections:: { HashMap , HashSet } ;
2525use std:: env;
2626use std:: ffi:: { OsStr , OsString } ;
@@ -1493,14 +1493,22 @@ impl<'test> TestCx<'test> {
14931493 unexpected. len( ) ,
14941494 not_found. len( )
14951495 ) ) ;
1496- println ! ( "status: {}\n command: {}" , proc_res. status, proc_res. cmdline) ;
1496+ println ! ( "status: {}\n command: {}\n " , proc_res. status, proc_res. cmdline) ;
14971497 if !unexpected. is_empty ( ) {
1498- println ! ( "unexpected errors (from JSON output): {:#?}\n " , unexpected) ;
1498+ println ! ( "{}" , "--- unexpected errors (from JSON output) ---" . green( ) ) ;
1499+ for error in & unexpected {
1500+ println ! ( "{}" , error. render_for_expected( ) ) ;
1501+ }
1502+ println ! ( "{}" , "---" . green( ) ) ;
14991503 }
15001504 if !not_found. is_empty ( ) {
1501- println ! ( "not found errors (from test file): {:#?}\n " , not_found) ;
1505+ println ! ( "{}" , "--- not found errors (from test file) ---" . red( ) ) ;
1506+ for error in & not_found {
1507+ println ! ( "{}" , error. render_for_expected( ) ) ;
1508+ }
1509+ println ! ( "{}" , "---\n " . red( ) ) ;
15021510 }
1503- panic ! ( ) ;
1511+ panic ! ( "errors differ from expected" ) ;
15041512 }
15051513 }
15061514
@@ -3435,13 +3443,13 @@ impl<'test> TestCx<'test> {
34353443 // ```
34363444 // base_dir/
34373445 // rmake.exe
3438- // scratch /
3446+ // rmake_out /
34393447 // ```
3440- // having the executable separate from the scratch directory allows the recipes to
3441- // `remove_dir_all(scratch )` without running into permission denied issues because
3442- // the executable is not under the `scratch /` directory.
3448+ // having the executable separate from the output artifacts directory allows the recipes to
3449+ // `remove_dir_all($TMPDIR )` without running into permission denied issues because
3450+ // the executable is not under the `rmake_out /` directory.
34433451 //
3444- // This setup diverges from legacy Makefile run-make tests.
3452+ // This setup intentionally diverges from legacy Makefile run-make tests.
34453453 let base_dir = cwd. join ( self . output_base_name ( ) ) ;
34463454 if base_dir. exists ( ) {
34473455 self . aggressive_rm_rf ( & base_dir) . unwrap ( ) ;
0 commit comments