From 67065d070d869f5eca01ca7e698afac8ba784e0a Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Wed, 5 Apr 2017 19:50:46 +0200 Subject: Add vulpix docstrings and change defines --- compiler/test/dotty/tools/dotc/CompilationTests.scala | 4 ++-- compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala | 13 +++++++++++-- compiler/test/dotty/tools/vulpix/VulpixTests.scala | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index 4d5ab6963..a3f44c74f 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -16,9 +16,9 @@ class CompilationTests extends SummaryReport with ParallelTesting { def maxDuration = 180.seconds def numberOfSlaves = 5 - def safeMode = sys.env.get("SAFEMODE").isDefined + def safeMode = sys.env.get("dotty.tests.safemode").isDefined def isInteractive = SummaryReport.isInteractive - def testFilter = sys.props.get("dotty.partest.filter").map(r => new Regex(r)) + def testFilter = sys.props.get("dotty.tests.filter").map(r => new Regex(r)) // Positive tests ------------------------------------------------------------ diff --git a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala index 22bebf714..476012d1d 100644 --- a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala +++ b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala @@ -47,7 +47,14 @@ trait RunnerOrchestration { private[this] val monitor = new RunnerMonitor - /** Look away now, sweet child of summer */ + /** The runner monitor object keeps track of child JVM processes by keeping + * them in two structures - one for free, and one for busy children. + * + * When a user calls `runMain` the monitor makes takes a free JVM and blocks + * until the run is complete - or `maxDuration` has passed. It then performs + * cleanup by returning the used JVM to the free list, or respawning it if + * it died + */ private class RunnerMonitor { def runMain(classPath: String): Status = withRunner(_.runMain(classPath)) @@ -128,6 +135,9 @@ trait RunnerOrchestration { } } + /** Create a process which has the classpath of the `ChildJVMMain` and the + * scala library. + */ private def createProcess: Process = { val sep = sys.props("file.separator") val cp = @@ -142,7 +152,6 @@ trait RunnerOrchestration { } private[this] val allRunners = List.fill(numberOfSlaves)(new Runner(createProcess)) - private[this] val freeRunners = mutable.Queue(allRunners: _*) private[this] val busyRunners = mutable.Set.empty[Runner] diff --git a/compiler/test/dotty/tools/vulpix/VulpixTests.scala b/compiler/test/dotty/tools/vulpix/VulpixTests.scala index bebcc7601..154008bd1 100644 --- a/compiler/test/dotty/tools/vulpix/VulpixTests.scala +++ b/compiler/test/dotty/tools/vulpix/VulpixTests.scala @@ -7,6 +7,7 @@ import org.junit.Test import scala.concurrent.duration._ import scala.util.control.NonFatal +/** Meta tests for the Vulpix test suite */ class VulpixTests extends ParallelTesting { import dotc.CompilationTests._ -- cgit v1.2.3