@@ -152,9 +152,9 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
152152 private def assembleTestCommand (outDir : File , logFile : File ): List [String ] = {
153153 // check whether there is a ".javaopts" file
154154 val argsFile = testFile changeExtension " javaopts"
155- val argString = file2String (argsFile)
156- if (argString != " " )
157- nestUI.verbose(" Found javaopts file '%s ', using options: '%s' " .format(argsFile, argString) )
155+ val javaopts = readOptionsFile (argsFile)
156+ if (javaopts.nonEmpty )
157+ nestUI.verbose(s " Found javaopts file ' $argsFile ', using options: ' ${javaopts.mkString( " , " )} ' " )
158158
159159 val testFullPath = testFile.getAbsolutePath
160160
@@ -186,7 +186,7 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
186186 val classpath = joinPaths(extraClasspath ++ testClassPath)
187187
188188 javaCmdPath +: (
189- (suiteRunner.javaOpts.split(' ' ) ++ extraJavaOptions ++ argString.split( ' ' )).map(_.trim ).filter(_ != " " ).toList ++ Seq (
189+ (suiteRunner.javaOpts.split(' ' ) ++ extraJavaOptions ++ javaopts ).filter(_ != " " ).toList ++ Seq (
190190 " -classpath" ,
191191 join(outDir.toString, classpath)
192192 ) ++ propertyOptions ++ Seq (
@@ -445,10 +445,9 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
445445
446446 // snort or scarf all the contributing flags files
447447 def flagsForCompilation (sources : List [File ]): List [String ] = {
448- def argsplitter (s : String ) = words(s) filter (_.nonEmpty)
449- val perTest = argsplitter(flagsFile.fileContents)
448+ val perTest = readOptionsFile(flagsFile)
450449 val perGroup = if (testFile.isDirectory) {
451- sources flatMap { f => SFile ( Path (f) changeExtension " flags" ).safeSlurp map argsplitter getOrElse Nil }
450+ sources. flatMap( f => readOptionsFile(f changeExtension " flags" ))
452451 } else Nil
453452 perTest ++ perGroup
454453 }
0 commit comments