Skip to content

Commit 1fb2082

Browse files
committed
Print remaining tests in case of timeout
1 parent db935a8 commit 1fb2082

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

compiler/test/dotty/tools/vulpix/ParallelTesting.scala

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import scala.io.Source
1515
import scala.util.{Random, Try, Failure => TryFailure, Success => TrySuccess, Using}
1616
import scala.util.control.NonFatal
1717
import scala.util.matching.Regex
18+
import scala.collection.mutable.ListBuffer
1819

1920
import dotc.{Compiler, Driver}
2021
import dotc.core.Contexts._
@@ -543,11 +544,18 @@ trait ParallelTesting extends RunnerOrchestration { self =>
543544
}
544545

545546
pool.shutdown()
547+
546548
if (!pool.awaitTermination(20, TimeUnit.MINUTES)) {
549+
val remaining = new ListBuffer[TestSource]
550+
filteredSources.lazyZip(eventualResults).foreach { (src, res) =>
551+
if (!res.isDone)
552+
remaining += src
553+
}
554+
547555
pool.shutdownNow()
548556
System.setOut(realStdout)
549557
System.setErr(realStderr)
550-
throw new TimeoutException("Compiling targets timed out")
558+
throw new TimeoutException(s"Compiling targets timed out, remaining targets: ${remaining.mkString(", ")}")
551559
}
552560

553561
eventualResults.foreach { x =>

0 commit comments

Comments
 (0)