Skip to content

Commit 9988c09

Browse files
committed
partest: run tests with -Xms64M -Xmx1024M instead of JVM defaults
This is the same settings that scalac uses, this should help use avoid using too much memory (the default on 64 bits Linux seems to be -Xms248M -Xmx3938M).
1 parent 13b6165 commit 9988c09

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

test/dotty/partest/DPConfig.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import scala.collection.JavaConversions._
44
import scala.reflect.io.Path
55
import java.io.File
66

7+
import scala.tools.partest.PartestDefaults
8+
79

810
/** Dotty Partest runs all tests in the provided testDirs located under
911
* testRoot. There can be several directories with pos resp. neg tests, as
@@ -15,6 +17,8 @@ import java.io.File
1517
* otherwise pos/__defaultFlags.flags are used if the file exists).
1618
*/
1719
object DPConfig {
20+
val javaOpts = s"-Xms64M -Xmx1024M ${PartestDefaults.javaOpts}"
21+
1822
val testRoot = (Path(".") / Path("tests") / Path("partest-generated")).toString
1923
val genLog = Path(testRoot) / Path("gen.log")
2024

test/dotty/partest/DPConsoleRunner.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ class DPSuiteRunner(testSourcePath: String, // relative path, like "files", or "
6565
consoleArgs: String,
6666
javaCmdPath: String = PartestDefaults.javaCmd,
6767
javacCmdPath: String = PartestDefaults.javacCmd,
68-
scalacExtraArgs: Seq[String] = Seq.empty)
69-
extends SuiteRunner(testSourcePath, fileManager, updateCheck, failed, javaCmdPath, javacCmdPath, scalacExtraArgs) {
68+
scalacExtraArgs: Seq[String] = Seq.empty,
69+
javaOpts: String = DPConfig.javaOpts)
70+
extends SuiteRunner(testSourcePath, fileManager, updateCheck, failed, javaCmdPath, javacCmdPath, scalacExtraArgs, javaOpts) {
7071

7172
if (!DPConfig.runTestsInParallel)
7273
sys.props("partest.threads") = "1"

0 commit comments

Comments
 (0)