@@ -3634,26 +3634,30 @@ impl<'test> TestCx<'test> {
3634
3634
let expected_stderr = self . load_expected_output ( stderr_kind) ;
3635
3635
let expected_stdout = self . load_expected_output ( stdout_kind) ;
3636
3636
3637
- let normalized_stdout = match output_kind {
3637
+ let mut normalized_stdout =
3638
+ self . normalize_output ( & proc_res. stdout , & self . props . normalize_stdout ) ;
3639
+ match output_kind {
3638
3640
TestOutput :: Run if self . config . remote_test_client . is_some ( ) => {
3639
3641
// When tests are run using the remote-test-client, the string
3640
3642
// 'uploaded "$TEST_BUILD_DIR/<test_executable>, waiting for result"'
3641
3643
// is printed to stdout by the client and then captured in the ProcRes,
3642
- // so it needs to be removed when comparing the run-pass test execution output
3644
+ // so it needs to be removed when comparing the run-pass test execution output.
3643
3645
static REMOTE_TEST_RE : Lazy < Regex > = Lazy :: new ( || {
3644
3646
Regex :: new (
3645
3647
"^uploaded \" \\ $TEST_BUILD_DIR(/[[:alnum:]_\\ -.]+)+\" , waiting for result\n "
3646
3648
)
3647
3649
. unwrap ( )
3648
3650
} ) ;
3649
- REMOTE_TEST_RE
3650
- . replace (
3651
- & self . normalize_output ( & proc_res. stdout , & self . props . normalize_stdout ) ,
3652
- "" ,
3653
- )
3654
- . to_string ( )
3651
+ normalized_stdout = REMOTE_TEST_RE . replace ( & normalized_stdout, "" ) . to_string ( ) ;
3652
+ // When there is a panic, the remote-test-client also prints "died due to signal";
3653
+ // that needs to be removed as well.
3654
+ static SIGNAL_DIED_RE : Lazy < Regex > =
3655
+ Lazy :: new ( || Regex :: new ( "^died due to signal [0-9]+\n " ) . unwrap ( ) ) ;
3656
+ normalized_stdout = SIGNAL_DIED_RE . replace ( & normalized_stdout, "" ) . to_string ( ) ;
3657
+ // FIXME: it would be much nicer if we could just tell the remote-test-client to not
3658
+ // print these things.
3655
3659
}
3656
- _ => self . normalize_output ( & proc_res . stdout , & self . props . normalize_stdout ) ,
3660
+ _ => { }
3657
3661
} ;
3658
3662
3659
3663
let stderr = if explicit_format {
0 commit comments