From bbb8904d73e1f94b35c99974b360c7a0ad7b6664 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Sun, 17 Jan 2016 15:29:18 +0100 Subject: [PATCH 1/2] Use less threads than we have cores on Jenkins, increase max heap Using less threads should allow us to increase the maximum heap size without filling up the memory of the Jenkins instance --- project/Build.scala | 4 +--- test/dotty/partest/DPConsoleRunner.scala | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) 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") = "." From b0b20e94430057f8e8198aa73eb9da5e47415a44 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Sun, 17 Jan 2016 16:25:57 +0100 Subject: [PATCH 2/2] Force rebuild