From 62bfacb9ce4d1860b8b6cf897d3a36076b51a662 Mon Sep 17 00:00:00 2001 From: Paul Gey Date: Sun, 14 Apr 2024 18:40:25 +0200 Subject: [PATCH] Parse test results from tests running with `--quiet` --- CHANGELOG.md | 1 + src/line_analysis.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4f00816..5807797d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - default binding for 'c' in bacon.toml is now the new 'clippy-all' job which does what the old 'clippy' job was doing. 'clippy' job changed to not run on all targets. Default bacon.toml explain how to bind 'c' to clippy instead of 'clippy-all' - Fix #167 - expand env vars in job command unless the job specifies `expand_env_vars = false` - Fix #181 - some file events filtered out from watch (feedback welcome, especially if you notice some failures to recompute) +- parse test results even when tests are run with `-q`/`--quiet` ### v2.16.0 - 2024/03/30 diff --git a/src/line_analysis.rs b/src/line_analysis.rs index 1139e832..1e570d81 100644 --- a/src/line_analysis.rs +++ b/src/line_analysis.rs @@ -130,7 +130,7 @@ fn is_build_failed(ts: Option<&TString>) -> bool { /// part is in another TString) fn as_test_name(s: &str) -> Option<&str> { regex_captures!( - r#"^test\s+(.+?)(?: - should panic\s*)?(?: - compile\s*)?\s+...\s*$"#, + r#"^(?:test\s+)?(.+?)(?: - should panic\s*)?(?: - compile\s*)?\s+...\s*$"#, s ) .map(|(_, key)| key) @@ -154,7 +154,7 @@ fn as_test_name(s: &str) -> Option<&str> { /// (in this case, the " - should panic" part isn't in the key, see #95) fn as_test_result(s: &str) -> Option<(&str, bool)> { regex_captures!( - r#"^test\s+(.+?)(?: - should panic\s*)?(?: - compile\s*)?\s+...\s+(\w+)$"#, + r#"^(?:test\s+)?(.+?)(?: - should panic\s*)?(?: - compile\s*)?\s+...\s+(\w+)$"#, s ) .and_then(|(_, key, outcome)| match outcome {