@@ -17,10 +17,10 @@ use crate::json;
17
17
use crate :: read2:: { read2_abbreviated, Truncated } ;
18
18
use crate :: util:: { add_dylib_path, dylib_env_var, logv, PathBufExt } ;
19
19
use crate :: ColorConfig ;
20
+ use colored:: Colorize ;
20
21
use miropt_test_tools:: { files_for_miropt_test, MiroptTest , MiroptTestFile } ;
21
22
use regex:: { Captures , Regex } ;
22
23
use rustfix:: { apply_suggestions, get_suggestions_from_json, Filter } ;
23
-
24
24
use std:: collections:: { HashMap , HashSet } ;
25
25
use std:: env;
26
26
use std:: ffi:: { OsStr , OsString } ;
@@ -1493,14 +1493,22 @@ impl<'test> TestCx<'test> {
1493
1493
unexpected. len( ) ,
1494
1494
not_found. len( )
1495
1495
) ) ;
1496
- println ! ( "status: {}\n command: {}" , proc_res. status, proc_res. cmdline) ;
1496
+ println ! ( "status: {}\n command: {}\n " , proc_res. status, proc_res. cmdline) ;
1497
1497
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( ) ) ;
1499
1503
}
1500
1504
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( ) ) ;
1502
1510
}
1503
- panic ! ( ) ;
1511
+ panic ! ( "errors differ from expected" ) ;
1504
1512
}
1505
1513
}
1506
1514
@@ -3435,13 +3443,13 @@ impl<'test> TestCx<'test> {
3435
3443
// ```
3436
3444
// base_dir/
3437
3445
// rmake.exe
3438
- // scratch /
3446
+ // rmake_out /
3439
3447
// ```
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.
3443
3451
//
3444
- // This setup diverges from legacy Makefile run-make tests.
3452
+ // This setup intentionally diverges from legacy Makefile run-make tests.
3445
3453
let base_dir = cwd. join ( self . output_base_name ( ) ) ;
3446
3454
if base_dir. exists ( ) {
3447
3455
self . aggressive_rm_rf ( & base_dir) . unwrap ( ) ;
0 commit comments