@@ -286,10 +286,9 @@ trait ParallelTesting extends RunnerOrchestration { self =>
286
286
realStderr.println(msg + paddingRight)
287
287
}
288
288
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
293
292
if (tCompiled < sourceCount) {
294
293
val timestamp = (System .currentTimeMillis - start) / 1000
295
294
val progress = (tCompiled.toDouble / sourceCount * 40 ).toInt
@@ -301,13 +300,6 @@ trait ParallelTesting extends RunnerOrchestration { self =>
301
300
s " ] completed ( $tCompiled/ $sourceCount, $failureCount failed, ${timestamp}s) \r "
302
301
)
303
302
}
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
- }
311
303
}
312
304
313
305
/** Wrapper function to make sure that the compiler itself did not crash -
@@ -466,9 +458,10 @@ trait ParallelTesting extends RunnerOrchestration { self =>
466
458
467
459
val timer = new Timer ()
468
460
val logProgress = isInteractive && ! suppressAllOutput
461
+ val start = System .currentTimeMillis()
469
462
if (logProgress) {
470
463
val task = new TimerTask {
471
- def run () = updateProgressMonitor()
464
+ def run (): Unit = updateProgressMonitor(start )
472
465
}
473
466
timer.schedule(task, 100 , 200 )
474
467
}
@@ -489,8 +482,10 @@ trait ParallelTesting extends RunnerOrchestration { self =>
489
482
490
483
if (logProgress) {
491
484
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
+ )
494
489
}
495
490
496
491
if (didFail) {
0 commit comments