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