Skip to content

Commit 66e73a1

Browse files
committed
Fix settings having uninitialized values
1 parent fcc6d50 commit 66e73a1

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

compiler/test/dotc/comptest.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@ package dotc
22

33
import dotty.tools.dotc.vulpix.ParallelTesting
44

5+
import scala.concurrent.duration._
6+
57
object comptest extends ParallelTesting {
68

9+
def maxDuration = 3.seconds
10+
def numberOfSlaves = 5
11+
def safeMode = false
712
def isInteractive = true
813
def testFilter = None
914

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,20 @@ import org.junit.Test
66
import org.junit.experimental.categories.Category
77

88
import scala.util.matching.Regex
9+
import scala.concurrent.duration._
910
import vulpix.{ ParallelTesting, SummaryReport }
1011

1112
@Category(Array(classOf[ParallelTesting]))
1213
class CompilationTests extends SummaryReport with ParallelTesting {
1314
import CompilationTests._
1415

15-
def isInteractive: Boolean = SummaryReport.isInteractive
16+
// Test suite configuration --------------------------------------------------
1617

17-
def testFilter: Option[Regex] = sys.props.get("dotty.partest.filter").map(r => new Regex(r))
18+
def maxDuration = 3.seconds
19+
def numberOfSlaves = 5
20+
def safeMode = sys.env.get("SAFEMODE").isDefined
21+
def isInteractive = SummaryReport.isInteractive
22+
def testFilter = sys.props.get("dotty.partest.filter").map(r => new Regex(r))
1823

1924
// Positive tests ------------------------------------------------------------
2025

compiler/test/dotty/tools/dotc/vulpix/RunnerOrchestration.scala

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
package dotty
2-
package tools
3-
package dotc
1+
package dotty.tools.dotc
42
package vulpix
53

64
import java.io.{
@@ -18,15 +16,15 @@ import scala.collection.mutable
1816
trait RunnerOrchestration {
1917

2018
/** The maximum amount of active runners, which contain a child JVM */
21-
val numberOfSlaves: Int
19+
def numberOfSlaves: Int
2220

2321
/** The maximum duration the child process is allowed to consume before
2422
* getting destroyed
2523
*/
26-
val maxDuration: Duration
24+
def maxDuration: Duration
2725

2826
/** Destroy and respawn process after each test */
29-
val safeMode: Boolean
27+
def safeMode: Boolean
3028

3129
/** Running a `Test` class's main method from the specified `dir` */
3230
def runMain(dir: JFile): Status = monitor.runMain(dir)

compiler/test/dotty/tools/dotc/vulpix/VulpixTests.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ package vulpix
66
import org.junit.Assert._
77
import org.junit.Test
88

9+
import scala.concurrent.duration._
910
import scala.util.control.NonFatal
1011

1112
class VulpixTests extends ParallelTesting {
1213
import CompilationTests._
1314

15+
def maxDuration = 3.seconds
16+
def numberOfSlaves = 5
17+
def safeMode = sys.env.get("SAFEMODE").isDefined
1418
def isInteractive = !sys.env.contains("DRONE")
1519
def testFilter = None
1620

0 commit comments

Comments
 (0)