Skip to content

Commit

Permalink
[nextest-runner] reset progress bar elapsed time on SIGCONT (#2091)
Browse files Browse the repository at this point in the history
On continuing, ensure that the elapsed time is set to the actual time.
  • Loading branch information
sunshowers authored Jan 22, 2025
1 parent 394ccc1 commit b93b21f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nextest-runner/src/reporter/displayer/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ impl ProgressBarState {
// Continuing the run should show the progress bar since we'll
// continue to output to it.
self.hidden_run_paused = false;
// Wish a mutable form of with_elapsed were supported.
let bar = std::mem::replace(&mut self.bar, ProgressBar::hidden());
self.bar = bar.with_elapsed(event.elapsed);
}
TestEventKind::RunBeginCancel { reason, .. }
| TestEventKind::RunBeginKill { reason, .. } => {
Expand Down

0 comments on commit b93b21f

Please sign in to comment.