From 3f7ed71dc9dc4f81b9435be109a52990d833d1a1 Mon Sep 17 00:00:00 2001 From: Paul Gey Date: Tue, 11 Nov 2025 21:48:44 +0100 Subject: [PATCH] Allow thread ID when parsing panic messages --- src/analysis/nextest/nextest_line_analyser.rs | 2 +- src/analysis/standard/standard_line_analyser.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/analysis/nextest/nextest_line_analyser.rs b/src/analysis/nextest/nextest_line_analyser.rs index 6f85529..5f79107 100644 --- a/src/analysis/nextest/nextest_line_analyser.rs +++ b/src/analysis/nextest/nextest_line_analyser.rs @@ -187,7 +187,7 @@ fn is_location_v3(content: &TLine) -> bool { return false; } regex_is_match!( - r#"^\s*thread '.+' panicked at [^:\s'"]+:\d+:\d+:$"#, + r#"^\s*thread '.+'( \(\d+\))? panicked at [^:\s'"]+:\d+:\d+:$"#, &ts.raw ) } diff --git a/src/analysis/standard/standard_line_analyser.rs b/src/analysis/standard/standard_line_analyser.rs index 2bddae9..37ca544 100644 --- a/src/analysis/standard/standard_line_analyser.rs +++ b/src/analysis/standard/standard_line_analyser.rs @@ -60,7 +60,7 @@ fn analyze_line(cmd_line: &CommandOutputLine) -> LineAnalysis { } else if regex_is_match!(r#"^\s+--> [^:\s'"]+:\d+:\d+$"#, content) { // this comes up in test failures to compile LineType::Location - } else if regex_is_match!(r#"^thread '.+' panicked at [^:\s'"]+:\d+:\d+:$"#, content) { + } else if regex_is_match!(r#"^thread '.+'( \(\d+\))? panicked at [^:\s'"]+:\d+:\d+:$"#, content) { // this comes up in test failures LineType::Location } else { @@ -122,7 +122,7 @@ fn analyze_line(cmd_line: &CommandOutputLine) -> LineAnalysis { } (Some(content), None) => { if regex_is_match!( - r#"^\s*thread '.+' panicked at [^:\s'"]+:\d+:\d+:$"#, + r#"^\s*thread '.+'( \(\d+\))? panicked at [^:\s'"]+:\d+:\d+:$"#, &content.raw ) { // this comes up in nextest failures