@@ -111,7 +111,9 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner) {
111
111
joinPaths(outDir :: testClassPath),
112
112
" -J-Duser.language=en" ,
113
113
" -J-Duser.country=US"
114
- ) ++ files.map(_.getAbsolutePath)
114
+ ) ++ (toolArgsFor(files)(" javac" )
115
+ ) ++ (files.map(_.getAbsolutePath)
116
+ )
115
117
116
118
pushTranscript(args mkString " " )
117
119
val captured = StreamCapture (runCommand(args, logFile))
@@ -439,7 +441,12 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner) {
439
441
perTest ++ perGroup
440
442
}
441
443
442
- def toolArgs (tool : String , split : Boolean = true ): List [String ] = {
444
+ // inspect sources for tool args
445
+ def toolArgs (tool : String , split : Boolean = true ): List [String ] =
446
+ toolArgsFor(sources(testFile))(tool, split)
447
+
448
+ // inspect given files for tool args
449
+ def toolArgsFor (files : List [File ])(tool : String , split : Boolean = true ): List [String ] = {
443
450
def argsplitter (s : String ) = if (split) words(s) filter (_.nonEmpty) else List (s)
444
451
def argsFor (f : File ): List [String ] = {
445
452
import scala .util .matching .Regex
@@ -453,7 +460,7 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner) {
453
460
} finally src.close()
454
461
args.flatten map argsplitter getOrElse Nil
455
462
}
456
- sources(testFile) flatMap argsFor
463
+ files flatMap argsFor
457
464
}
458
465
459
466
abstract class CompileRound {
0 commit comments