@@ -111,7 +111,9 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner) {
111111 joinPaths(outDir :: testClassPath),
112112 " -J-Duser.language=en" ,
113113 " -J-Duser.country=US"
114- ) ++ files.map(_.getAbsolutePath)
114+ ) ++ (toolArgsFor(files)(" javac" )
115+ ) ++ (files.map(_.getAbsolutePath)
116+ )
115117
116118 pushTranscript(args mkString " " )
117119 val captured = StreamCapture (runCommand(args, logFile))
@@ -439,7 +441,12 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner) {
439441 perTest ++ perGroup
440442 }
441443
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 ] = {
443450 def argsplitter (s : String ) = if (split) words(s) filter (_.nonEmpty) else List (s)
444451 def argsFor (f : File ): List [String ] = {
445452 import scala .util .matching .Regex
@@ -453,7 +460,7 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner) {
453460 } finally src.close()
454461 args.flatten map argsplitter getOrElse Nil
455462 }
456- sources(testFile) flatMap argsFor
463+ files flatMap argsFor
457464 }
458465
459466 abstract class CompileRound {
0 commit comments