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 @@ -2413,6 +2413,11 @@ impl<'test> TestCx<'test> {
2413
2413
} )
2414
2414
. into_owned ( ) ;
2415
2415
2416
+ // Normalize thread IDs in panic messages
2417
+ normalized = static_regex ! ( r"thread '(?P<name>.*?)' \(\d+\) panicked" )
2418
+ . replace_all ( & normalized, "thread '$name' ($$TID) panicked" )
2419
+ . into_owned ( ) ;
2420
+
2416
2421
normalized = normalized. replace ( "\t " , "\\ t" ) ; // makes tabs visible
2417
2422
2418
2423
// Remove test annotations like `//~ ERROR text` from the output,
Original file line number Diff line number Diff line change @@ -251,7 +251,8 @@ regexes! {
251
251
// erase alloc ids
252
252
"alloc[0-9]+" => "ALLOC" ,
253
253
// erase thread ids
254
- r"unnamed-[0-9]+" => "unnamed-ID" ,
254
+ r"unnamed-[0-9]+" => "unnamed-ID" ,
255
+ r"thread '(?P<name>.*?)' \(\d+\) panicked" => "thread '$name' ($$TID) panicked" ,
255
256
// erase borrow tags
256
257
"<[0-9]+>" => "<TAG>" ,
257
258
"<[0-9]+=" => "<TAG=" ,
You can’t perform that action at this time.
0 commit comments