aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDmitry Petrashko <dark@d-d.me>2016-02-12 17:22:25 +0100
committerDmitry Petrashko <dark@d-d.me>2016-02-12 17:22:25 +0100
commitd04e704dda619331ae16ef870e1154ece77dd541 (patch)
treeeb0c1a60e579dba790ceb08d523b06799316a486 /test
parent6cc0e484bda30468ea2e2bcba2d11968e996b5c2 (diff)
parentd57fd8bc9fc9eadf620b29a89a69b7d974a7ec65 (diff)
downloaddotty-d04e704dda619331ae16ef870e1154ece77dd541.tar.gz
dotty-d04e704dda619331ae16ef870e1154ece77dd541.tar.bz2
dotty-d04e704dda619331ae16ef870e1154ece77dd541.zip
Merge pull request #1076 from dotty-staging/fix/run-tests-memory
partest: run tests with -Xms64M -Xmx1024M instead of JVM defaults
Diffstat (limited to 'test')
-rw-r--r--test/dotty/partest/DPConfig.scala8
-rw-r--r--test/dotty/partest/DPConsoleRunner.scala5
2 files changed, 11 insertions, 2 deletions
diff --git a/test/dotty/partest/DPConfig.scala b/test/dotty/partest/DPConfig.scala
index 12453b450..79f41340c 100644
--- a/test/dotty/partest/DPConfig.scala
+++ b/test/dotty/partest/DPConfig.scala
@@ -4,6 +4,8 @@ import scala.collection.JavaConversions._
import scala.reflect.io.Path
import java.io.File
+import scala.tools.partest.PartestDefaults
+
/** Dotty Partest runs all tests in the provided testDirs located under
* testRoot. There can be several directories with pos resp. neg tests, as
@@ -15,6 +17,12 @@ import java.io.File
* otherwise pos/__defaultFlags.flags are used if the file exists).
*/
object DPConfig {
+ /** Options used for _running_ the run tests.
+ * Note that this is different from the options used when _compiling_ tests,
+ * those are determined by the sbt configuration.
+ */
+ val runJVMOpts = s"-Xms64M -Xmx1024M ${PartestDefaults.javaOpts}"
+
val testRoot = (Path(".") / Path("tests") / Path("partest-generated")).toString
val genLog = Path(testRoot) / Path("gen.log")
diff --git a/test/dotty/partest/DPConsoleRunner.scala b/test/dotty/partest/DPConsoleRunner.scala
index fa6256398..baa62579c 100644
--- a/test/dotty/partest/DPConsoleRunner.scala
+++ b/test/dotty/partest/DPConsoleRunner.scala
@@ -65,8 +65,9 @@ class DPSuiteRunner(testSourcePath: String, // relative path, like "files", or "
consoleArgs: String,
javaCmdPath: String = PartestDefaults.javaCmd,
javacCmdPath: String = PartestDefaults.javacCmd,
- scalacExtraArgs: Seq[String] = Seq.empty)
-extends SuiteRunner(testSourcePath, fileManager, updateCheck, failed, javaCmdPath, javacCmdPath, scalacExtraArgs) {
+ scalacExtraArgs: Seq[String] = Seq.empty,
+ javaOpts: String = DPConfig.runJVMOpts)
+extends SuiteRunner(testSourcePath, fileManager, updateCheck, failed, javaCmdPath, javacCmdPath, scalacExtraArgs, javaOpts) {
if (!DPConfig.runTestsInParallel)
sys.props("partest.threads") = "1"