From a3078ee21bab6da72fa0077fe140173785e17c6a Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Tue, 4 Apr 2017 16:43:51 +0200 Subject: Fix settings having uninitialized values --- compiler/test/dotc/comptest.scala | 5 +++++ compiler/test/dotty/tools/dotc/CompilationTests.scala | 9 +++++++-- .../test/dotty/tools/dotc/vulpix/RunnerOrchestration.scala | 10 ++++------ compiler/test/dotty/tools/dotc/vulpix/VulpixTests.scala | 4 ++++ 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/compiler/test/dotc/comptest.scala b/compiler/test/dotc/comptest.scala index d283f4ef0..ab55e0271 100644 --- a/compiler/test/dotc/comptest.scala +++ b/compiler/test/dotc/comptest.scala @@ -2,8 +2,13 @@ package dotc import dotty.tools.dotc.vulpix.ParallelTesting +import scala.concurrent.duration._ + object comptest extends ParallelTesting { + def maxDuration = 3.seconds + def numberOfSlaves = 5 + def safeMode = false def isInteractive = true def testFilter = None diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index a2d632b19..241714f8b 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -6,15 +6,20 @@ import org.junit.Test import org.junit.experimental.categories.Category import scala.util.matching.Regex +import scala.concurrent.duration._ import vulpix.{ ParallelTesting, SummaryReport } @Category(Array(classOf[ParallelTesting])) class CompilationTests extends SummaryReport with ParallelTesting { import CompilationTests._ - def isInteractive: Boolean = SummaryReport.isInteractive + // Test suite configuration -------------------------------------------------- - def testFilter: Option[Regex] = sys.props.get("dotty.partest.filter").map(r => new Regex(r)) + def maxDuration = 3.seconds + def numberOfSlaves = 5 + def safeMode = sys.env.get("SAFEMODE").isDefined + def isInteractive = SummaryReport.isInteractive + def testFilter = sys.props.get("dotty.partest.filter").map(r => new Regex(r)) // Positive tests ------------------------------------------------------------ diff --git a/compiler/test/dotty/tools/dotc/vulpix/RunnerOrchestration.scala b/compiler/test/dotty/tools/dotc/vulpix/RunnerOrchestration.scala index 8a5d16b83..a7da752bb 100644 --- a/compiler/test/dotty/tools/dotc/vulpix/RunnerOrchestration.scala +++ b/compiler/test/dotty/tools/dotc/vulpix/RunnerOrchestration.scala @@ -1,6 +1,4 @@ -package dotty -package tools -package dotc +package dotty.tools.dotc package vulpix import java.io.{ @@ -18,15 +16,15 @@ import scala.collection.mutable trait RunnerOrchestration { /** The maximum amount of active runners, which contain a child JVM */ - val numberOfSlaves: Int + def numberOfSlaves: Int /** The maximum duration the child process is allowed to consume before * getting destroyed */ - val maxDuration: Duration + def maxDuration: Duration /** Destroy and respawn process after each test */ - val safeMode: Boolean + def safeMode: Boolean /** Running a `Test` class's main method from the specified `dir` */ def runMain(dir: JFile): Status = monitor.runMain(dir) diff --git a/compiler/test/dotty/tools/dotc/vulpix/VulpixTests.scala b/compiler/test/dotty/tools/dotc/vulpix/VulpixTests.scala index dea5aa777..1a1775995 100644 --- a/compiler/test/dotty/tools/dotc/vulpix/VulpixTests.scala +++ b/compiler/test/dotty/tools/dotc/vulpix/VulpixTests.scala @@ -6,11 +6,15 @@ package vulpix import org.junit.Assert._ import org.junit.Test +import scala.concurrent.duration._ import scala.util.control.NonFatal class VulpixTests extends ParallelTesting { import CompilationTests._ + def maxDuration = 3.seconds + def numberOfSlaves = 5 + def safeMode = sys.env.get("SAFEMODE").isDefined def isInteractive = !sys.env.contains("DRONE") def testFilter = None -- cgit v1.2.3