diff --git a/project/Build.scala b/project/Build.scala index b0bad8f4ca20..3ecb9ac42de3 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -6,9 +6,7 @@ import scala.reflect.io.Path object DottyBuild extends Build { - // Currently, this cannot be increased without hitting the maximum amount of memory - // available on the Jenkins VMs - val travisMemLimit = List("-Xmx1100m") + val travisMemLimit = List("-Xmx1500m") val JENKINS_BUILD = "dotty.jenkins.build" diff --git a/test/dotty/partest/DPConsoleRunner.scala b/test/dotty/partest/DPConsoleRunner.scala index fa6256398d47..a84bd31e26be 100644 --- a/test/dotty/partest/DPConsoleRunner.scala +++ b/test/dotty/partest/DPConsoleRunner.scala @@ -68,8 +68,15 @@ class DPSuiteRunner(testSourcePath: String, // relative path, like "files", or " scalacExtraArgs: Seq[String] = Seq.empty) extends SuiteRunner(testSourcePath, fileManager, updateCheck, failed, javaCmdPath, javacCmdPath, scalacExtraArgs) { + val isJenkins = sys.props.isDefinedAt("dotty.jenkins.build") + val numCores = Runtime.getRuntime.availableProcessors + if (!DPConfig.runTestsInParallel) sys.props("partest.threads") = "1" + else if (isJenkins) + sys.props("partest.threads") = (numCores / 2).toString + else + sys.props("partest.threads") = numCores.toString sys.props("partest.root") = "."