@@ -286,10 +286,9 @@ trait ParallelTesting extends RunnerOrchestration { self =>
286286 realStderr.println(msg + paddingRight)
287287 }
288288
289- /** Print a progress bar for the curent `Test` */
290- private def updateProgressMonitor (): Unit = {
291- val start = System .currentTimeMillis
292- var tCompiled = testSourcesCompleted
289+ /** Print a progress bar for the current `Test` */
290+ private def updateProgressMonitor (start : Long ): Unit = {
291+ val tCompiled = testSourcesCompleted
293292 if (tCompiled < sourceCount) {
294293 val timestamp = (System .currentTimeMillis - start) / 1000
295294 val progress = (tCompiled.toDouble / sourceCount * 40 ).toInt
@@ -301,13 +300,6 @@ trait ParallelTesting extends RunnerOrchestration { self =>
301300 s " ] completed ( $tCompiled/ $sourceCount, $failureCount failed, ${timestamp}s) \r "
302301 )
303302 }
304- else {
305- val timestamp = (System .currentTimeMillis - start) / 1000
306- // println, otherwise no newline and cursor at start of line
307- realStdout.print(
308- s " [=======================================] completed ( $sourceCount/ $sourceCount, $failureCount failed, ${timestamp}s) \r "
309- )
310- }
311303 }
312304
313305 /** Wrapper function to make sure that the compiler itself did not crash -
@@ -466,9 +458,10 @@ trait ParallelTesting extends RunnerOrchestration { self =>
466458
467459 val timer = new Timer ()
468460 val logProgress = isInteractive && ! suppressAllOutput
461+ val start = System .currentTimeMillis()
469462 if (logProgress) {
470463 val task = new TimerTask {
471- def run () = updateProgressMonitor()
464+ def run (): Unit = updateProgressMonitor(start )
472465 }
473466 timer.schedule(task, 100 , 200 )
474467 }
@@ -489,8 +482,10 @@ trait ParallelTesting extends RunnerOrchestration { self =>
489482
490483 if (logProgress) {
491484 timer.cancel()
492- // update progress one last time
493- updateProgressMonitor()
485+ val timestamp = (System .currentTimeMillis - start) / 1000
486+ realStdout.println(
487+ s " [=======================================] completed ( $sourceCount/ $sourceCount, $failureCount failed, ${timestamp}s) "
488+ )
494489 }
495490
496491 if (didFail) {
0 commit comments