File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2524,6 +2524,11 @@ impl<'test> TestCx<'test> {
2524
2524
} )
2525
2525
. into_owned ( ) ;
2526
2526
2527
+ // Normalize thread IDs in panic messages
2528
+ normalized = static_regex ! ( r"thread '(?P<name>.*?)' \((rtid )?\d+\) panicked" )
2529
+ . replace_all ( & normalized, "thread '$name' ($$TID) panicked" )
2530
+ . into_owned ( ) ;
2531
+
2527
2532
normalized = normalized. replace ( "\t " , "\\ t" ) ; // makes tabs visible
2528
2533
2529
2534
// Remove test annotations like `//~ ERROR text` from the output,
Original file line number Diff line number Diff line change @@ -248,7 +248,8 @@ regexes! {
248
248
// erase alloc ids
249
249
"alloc[0-9]+" => "ALLOC" ,
250
250
// erase thread ids
251
- r"unnamed-[0-9]+" => "unnamed-ID" ,
251
+ r"unnamed-[0-9]+" => "unnamed-ID" ,
252
+ r"thread '(?P<name>.*?)' \(\d+\) panicked" => "thread '$name' ($$TID) panicked" ,
252
253
// erase borrow tags
253
254
"<[0-9]+>" => "<TAG>" ,
254
255
"<[0-9]+=" => "<TAG=" ,
You can’t perform that action at this time.
0 commit comments