summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-09-23 20:51:21 +0000
committerPaul Phillips <paulp@improving.org>2009-09-23 20:51:21 +0000
commitcaff582d5d95b345a155a0f9c3eec763164112da (patch)
treec65a07ac4bac94b232daba5f82c004fdc3254f35 /src
parentc2d33c65850de429a701a6009fe88e67eebc0fb1 (diff)
downloadscala-caff582d5d95b345a155a0f9c3eec763164112da.tar.gz
scala-caff582d5d95b345a155a0f9c3eec763164112da.tar.bz2
scala-caff582d5d95b345a155a0f9c3eec763164112da.zip
Fix for partest so all the javaopts files would...
Fix for partest so all the javaopts files wouldn't be ignored when running tests. With that in hand, fixed #2379.
Diffstat (limited to 'src')
-rw-r--r--src/partest/scala/tools/partest/nest/Worker.scala14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/partest/scala/tools/partest/nest/Worker.scala b/src/partest/scala/tools/partest/nest/Worker.scala
index e48be3da7b..5e10c9f5f5 100644
--- a/src/partest/scala/tools/partest/nest/Worker.scala
+++ b/src/partest/scala/tools/partest/nest/Worker.scala
@@ -235,24 +235,32 @@ class Worker(val fileManager: FileManager) extends Actor {
// check whether there is a ".javaopts" file
val argsFile = new File(logFile.getParentFile, fileBase+".javaopts")
val argString = if (argsFile.exists) {
- NestUI.verbose("argsFile: "+argsFile)
+ NestUI.verbose("Found javaopts file: "+argsFile)
val fileReader = new FileReader(argsFile)
val reader = new BufferedReader(fileReader)
val options = reader.readLine()
reader.close()
+ NestUI.verbose("Found javaopts file '%s', using options: '%s'".format(argsFile, options))
options
} else ""
- NestUI.verbose("JAVA_OPTS: "+argString)
val cp = System.getProperty("java.class.path", ".")
NestUI.verbose("java.class.path: "+cp)
def quote(path: String) = "\""+path+"\""
+ // Note! As this currently functions, JAVA_OPTS must precede argString
+ // because when an option is repeated to java only the last one wins.
+ // That means until now all the .javaopts files were being ignored because
+ // they all attempt to change options which are also defined in
+ // scalatest.java_opts, leading to debug output like:
+ //
+ // debug: Found javaopts file 'files/shootout/message.scala-2.javaopts', using options: '-Xss32k'
+ // debug: java -Xss32k -Xss2m -Xms256M -Xmx1024M -classpath [...]
val cmd =
JAVACMD+
- " "+argString+
" "+JAVA_OPTS+
+ " "+argString+
" -classpath "+outDir+File.pathSeparator+CLASSPATH+
" -Djava.library.path="+logFile.getParentFile.getAbsolutePath+
" -Dscalatest.output="+outDir.getAbsolutePath+