Skip to content

Commit eff75f8

Browse files
committed
Add normalization for thread IDs in panic messages
So we don't need to add normalization to every test that includes a panic message, add a global normalization to compiletest.
1 parent afb6f33 commit eff75f8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/tools/compiletest/src/runtest.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2413,6 +2413,11 @@ impl<'test> TestCx<'test> {
24132413
})
24142414
.into_owned();
24152415

2416+
// Normalize thread IDs in panic messages
2417+
normalized = static_regex!(r"thread '(?P<name>.*?)' \(0x[[:xdigit:]]+\) panicked")
2418+
.replace_all(&normalized, "thread '$name' ($$TID) panicked")
2419+
.into_owned();
2420+
24162421
normalized = normalized.replace("\t", "\\t"); // makes tabs visible
24172422

24182423
// Remove test annotations like `//~ ERROR text` from the output,

0 commit comments

Comments
 (0)