Skip to content

Commit

Permalink
feat: print total duration in final test summary (#7134)
Browse files Browse the repository at this point in the history
* feat: print total duration in final test summary

* fix: ignore regex
  • Loading branch information
DaniPopes authored Feb 15, 2024
1 parent 95aae1e commit 8cebc1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion crates/forge/src/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ impl TestOutcome {
let total_skipped = self.skipped();
let total_tests = total_passed + total_failed + total_skipped;
format!(
"\nRan {} test {}: {} tests passed, {} failed, {} skipped ({} total tests)",
"\nRan {} test {} in {:.2?}: {} tests passed, {} failed, {} skipped ({} total tests)",
num_test_suites,
suites,
self.duration(),
Paint::green(total_passed),
Paint::red(total_failed),
Paint::yellow(total_skipped),
Expand Down
2 changes: 1 addition & 1 deletion crates/test-utils/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ static IGNORE_IN_FIXTURES: Lazy<Regex> = Lazy::new(|| {
// solc runs
r"runs: \d+, μ: \d+, ~: \d+",
// elapsed time
"finished in .*?s",
"(?:finished)? ?in .*?s",
// file paths
r"-->.*\.sol",
r"Location(.|\n)*\.rs(.|\n)*Backtrace",
Expand Down

0 comments on commit 8cebc1f

Please sign in to comment.