@@ -52,10 +52,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
5252 def outDir : JFile
5353 def flags : TestFlags
5454
55- def runClassPath : String = {
56- val out = outDir.getAbsolutePath + (if (flags.isLinkedOptimised) " /linked.jar" else " " )
57- out + " :" + flags.runClassPath
58- }
55+ def runClassPath : String = outDir.getAbsolutePath + " :" + flags.runClassPath
5956
6057 def title : String = self match {
6158 case self : JointCompilationSource =>
@@ -1008,18 +1005,22 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10081005 }
10091006
10101007 /** Create out directory for directory `d` */
1011- private def createOutputDirsForDir (d : JFile , sourceDir : JFile , outDir : String ): JFile = {
1008+ private def createOutputDirsForDir (d : JFile , sourceDir : JFile , outDir : String , flags : TestFlags ): JFile = {
10121009 val targetDir = new JFile (outDir + s " ${sourceDir.getName}/ ${d.getName}" )
10131010 targetDir.mkdirs()
1014- targetDir
1011+ jaredIfNeeded( targetDir, flags)
10151012 }
10161013
10171014 /** Create out directory for `file` */
1018- private def createOutputDirsForFile (file : JFile , sourceDir : JFile , outDir : String ): JFile = {
1015+ private def createOutputDirsForFile (file : JFile , sourceDir : JFile , outDir : String , flags : TestFlags ): JFile = {
10191016 val uniqueSubdir = file.getName.substring(0 , file.getName.lastIndexOf('.' ))
10201017 val targetDir = new JFile (outDir + s " ${sourceDir.getName}/ $uniqueSubdir" )
10211018 targetDir.mkdirs()
1022- targetDir
1019+ jaredIfNeeded(targetDir, flags)
1020+ }
1021+
1022+ private def jaredIfNeeded (targetDir : JFile , flags : TestFlags ): JFile = {
1023+ new JFile (targetDir + (if (flags.isLinkTest) " /linked.jar" else " " ))
10231024 }
10241025
10251026 /** Make sure that directory string is as expected */
@@ -1081,7 +1082,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10811082 callingMethod,
10821083 Array (sourceFile),
10831084 flags,
1084- createOutputDirsForFile(sourceFile, parent, outDir)
1085+ createOutputDirsForFile(sourceFile, parent, outDir, flags )
10851086 )
10861087 new CompilationTest (target)
10871088 }
@@ -1161,9 +1162,11 @@ trait ParallelTesting extends RunnerOrchestration { self =>
11611162
11621163 val (dirs, files) = compilationTargets(sourceDir)
11631164
1165+ def createOutputDirsFor (f : JFile ): JFile = createOutputDirsForFile(f, sourceDir, outDir, flags)
1166+
11641167 val targets =
1165- files.map(f => JointCompilationSource (callingMethod, Array (f), flags, createOutputDirsForFile(f, sourceDir, outDir))) ++
1166- dirs.map(dir => SeparateCompilationSource (callingMethod, dir, flags, createOutputDirsForDir(dir, sourceDir, outDir)))
1168+ files.map(f => JointCompilationSource (callingMethod, Array (f), flags, createOutputDirsForFile(f, sourceDir, outDir, flags ))) ++
1169+ dirs.map(dir => SeparateCompilationSource (callingMethod, dir, flags, createOutputDirsForDir(dir, sourceDir, outDir, flags )))
11671170
11681171 // Create a CompilationTest and let the user decide whether to execute a pos or a neg test
11691172 new CompilationTest (targets)
@@ -1182,7 +1185,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
11821185 val (_, files) = compilationTargets(sourceDir)
11831186
11841187 val targets = files.map { file =>
1185- JointCompilationSource (callingMethod, Array (file), flags, createOutputDirsForFile(file, sourceDir, outDir))
1188+ JointCompilationSource (callingMethod, Array (file), flags, createOutputDirsForFile(file, sourceDir, outDir, flags ))
11861189 }
11871190
11881191 // Create a CompilationTest and let the user decide whether to execute a pos or a neg test
0 commit comments