@@ -1005,18 +1005,22 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10051005 }
10061006
10071007 /** Create out directory for directory `d` */
1008- private def createOutputDirsForDir (d : JFile , sourceDir : JFile , outDir : String ): JFile = {
1008+ private def createOutputDirsForDir (d : JFile , sourceDir : JFile , outDir : String , flags : TestFlags ): JFile = {
10091009 val targetDir = new JFile (outDir + s " ${sourceDir.getName}/ ${d.getName}" )
10101010 targetDir.mkdirs()
1011- targetDir
1011+ jaredIfNeeded( targetDir, flags)
10121012 }
10131013
10141014 /** Create out directory for `file` */
1015- private def createOutputDirsForFile (file : JFile , sourceDir : JFile , outDir : String ): JFile = {
1015+ private def createOutputDirsForFile (file : JFile , sourceDir : JFile , outDir : String , flags : TestFlags ): JFile = {
10161016 val uniqueSubdir = file.getName.substring(0 , file.getName.lastIndexOf('.' ))
10171017 val targetDir = new JFile (outDir + s " ${sourceDir.getName}/ $uniqueSubdir" )
10181018 targetDir.mkdirs()
1019- 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 " " ))
10201024 }
10211025
10221026 /** Make sure that directory string is as expected */
@@ -1078,7 +1082,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10781082 callingMethod,
10791083 Array (sourceFile),
10801084 flags,
1081- createOutputDirsForFile(sourceFile, parent, outDir)
1085+ createOutputDirsForFile(sourceFile, parent, outDir, flags )
10821086 )
10831087 new CompilationTest (target)
10841088 }
@@ -1158,9 +1162,11 @@ trait ParallelTesting extends RunnerOrchestration { self =>
11581162
11591163 val (dirs, files) = compilationTargets(sourceDir)
11601164
1165+ def createOutputDirsFor (f : JFile ): JFile = createOutputDirsForFile(f, sourceDir, outDir, flags)
1166+
11611167 val targets =
1162- files.map(f => JointCompilationSource (callingMethod, Array (f), flags, createOutputDirsForFile(f, sourceDir, outDir))) ++
1163- 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 )))
11641170
11651171 // Create a CompilationTest and let the user decide whether to execute a pos or a neg test
11661172 new CompilationTest (targets)
@@ -1179,7 +1185,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
11791185 val (_, files) = compilationTargets(sourceDir)
11801186
11811187 val targets = files.map { file =>
1182- JointCompilationSource (callingMethod, Array (file), flags, createOutputDirsForFile(file, sourceDir, outDir))
1188+ JointCompilationSource (callingMethod, Array (file), flags, createOutputDirsForFile(file, sourceDir, outDir, flags ))
11831189 }
11841190
11851191 // Create a CompilationTest and let the user decide whether to execute a pos or a neg test
0 commit comments