@@ -152,9 +152,9 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
152
152
private def assembleTestCommand (outDir : File , logFile : File ): List [String ] = {
153
153
// check whether there is a ".javaopts" file
154
154
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( " , " )} ' " )
158
158
159
159
val testFullPath = testFile.getAbsolutePath
160
160
@@ -186,7 +186,7 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
186
186
val classpath = joinPaths(extraClasspath ++ testClassPath)
187
187
188
188
javaCmdPath +: (
189
- (suiteRunner.javaOpts.split(' ' ) ++ extraJavaOptions ++ argString.split( ' ' )).map(_.trim ).filter(_ != " " ).toList ++ Seq (
189
+ (suiteRunner.javaOpts.split(' ' ) ++ extraJavaOptions ++ javaopts ).filter(_ != " " ).toList ++ Seq (
190
190
" -classpath" ,
191
191
join(outDir.toString, classpath)
192
192
) ++ propertyOptions ++ Seq (
@@ -445,10 +445,9 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
445
445
446
446
// snort or scarf all the contributing flags files
447
447
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)
450
449
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" ))
452
451
} else Nil
453
452
perTest ++ perGroup
454
453
}
0 commit comments