@@ -1027,18 +1027,22 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10271027 }
10281028
10291029 /** Create out directory for directory `d` */
1030- private def createOutputDirsForDir (d : JFile , sourceDir : JFile , outDir : String ): JFile = {
1030+ private def createOutputDirsForDir (d : JFile , sourceDir : JFile , outDir : String , flags : TestFlags ): JFile = {
10311031 val targetDir = new JFile (outDir + s " ${sourceDir.getName}/ ${d.getName}" )
10321032 targetDir.mkdirs()
1033- targetDir
1033+ jaredIfNeeded( targetDir, flags)
10341034 }
10351035
10361036 /** Create out directory for `file` */
1037- private def createOutputDirsForFile (file : JFile , sourceDir : JFile , outDir : String ): JFile = {
1037+ private def createOutputDirsForFile (file : JFile , sourceDir : JFile , outDir : String , flags : TestFlags ): JFile = {
10381038 val uniqueSubdir = file.getName.substring(0 , file.getName.lastIndexOf('.' ))
10391039 val targetDir = new JFile (outDir + s " ${sourceDir.getName}/ $uniqueSubdir" )
10401040 targetDir.mkdirs()
1041- targetDir
1041+ jaredIfNeeded(targetDir, flags)
1042+ }
1043+
1044+ private def jaredIfNeeded (targetDir : JFile , flags : TestFlags ): JFile = {
1045+ new JFile (targetDir + (if (flags.isLinkTest) " /linked.jar" else " " ))
10421046 }
10431047
10441048 /** Make sure that directory string is as expected */
@@ -1073,7 +1077,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10731077 testGroup.name,
10741078 Array (sourceFile),
10751079 flags,
1076- createOutputDirsForFile(sourceFile, parent, outDir)
1080+ createOutputDirsForFile(sourceFile, parent, outDir, flags )
10771081 )
10781082 new CompilationTest (target)
10791083 }
@@ -1095,7 +1099,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10951099 (parent ne null ) && parent.exists && parent.isDirectory,
10961100 s " Source file: $f, didn't exist "
10971101 )
1098- val tastySource = createOutputDirsForFile(sourceFile, parent, outDir)
1102+ val tastySource = createOutputDirsForFile(sourceFile, parent, outDir, flags )
10991103 val target = JointCompilationSource (
11001104 testGroup.name,
11011105 Array (sourceFile),
@@ -1180,8 +1184,8 @@ trait ParallelTesting extends RunnerOrchestration { self =>
11801184 val (dirs, files) = compilationTargets(sourceDir)
11811185
11821186 val targets =
1183- files.map(f => JointCompilationSource (testGroup.name, Array (f), flags, createOutputDirsForFile(f, sourceDir, outDir))) ++
1184- dirs.map(dir => SeparateCompilationSource (testGroup.name, dir, flags, createOutputDirsForDir(dir, sourceDir, outDir)))
1187+ files.map(f => JointCompilationSource (testGroup.name, Array (f), flags, createOutputDirsForFile(f, sourceDir, outDir, flags ))) ++
1188+ dirs.map(dir => SeparateCompilationSource (testGroup.name, dir, flags, createOutputDirsForDir(dir, sourceDir, outDir, flags )))
11851189
11861190 // Create a CompilationTest and let the user decide whether to execute a pos or a neg test
11871191 new CompilationTest (targets)
@@ -1217,7 +1221,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
12171221
12181222 val targets =
12191223 files.map { f =>
1220- val classpath = createOutputDirsForFile(f, sourceDir, outDir)
1224+ val classpath = createOutputDirsForFile(f, sourceDir, outDir, flags )
12211225 JointCompilationSource (testGroup.name, Array (f), flags.withClasspath(classpath.getPath), classpath, fromTasty = true )
12221226 }
12231227 // TODO add SeparateCompilationSource from tasty?
@@ -1240,7 +1244,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
12401244 val (_, files) = compilationTargets(sourceDir)
12411245
12421246 val targets = files.map { file =>
1243- JointCompilationSource (testGroup.name, Array (file), flags, createOutputDirsForFile(file, sourceDir, outDir))
1247+ JointCompilationSource (testGroup.name, Array (file), flags, createOutputDirsForFile(file, sourceDir, outDir, flags ))
12441248 }
12451249
12461250 // Create a CompilationTest and let the user decide whether to execute a pos or a neg test
0 commit comments