@@ -1027,18 +1027,22 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1027
1027
}
1028
1028
1029
1029
/** 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 = {
1031
1031
val targetDir = new JFile (outDir + s " ${sourceDir.getName}/ ${d.getName}" )
1032
1032
targetDir.mkdirs()
1033
- targetDir
1033
+ jaredIfNeeded( targetDir, flags)
1034
1034
}
1035
1035
1036
1036
/** 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 = {
1038
1038
val uniqueSubdir = file.getName.substring(0 , file.getName.lastIndexOf('.' ))
1039
1039
val targetDir = new JFile (outDir + s " ${sourceDir.getName}/ $uniqueSubdir" )
1040
1040
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 " " ))
1042
1046
}
1043
1047
1044
1048
/** Make sure that directory string is as expected */
@@ -1073,7 +1077,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1073
1077
testGroup.name,
1074
1078
Array (sourceFile),
1075
1079
flags,
1076
- createOutputDirsForFile(sourceFile, parent, outDir)
1080
+ createOutputDirsForFile(sourceFile, parent, outDir, flags )
1077
1081
)
1078
1082
new CompilationTest (target)
1079
1083
}
@@ -1095,7 +1099,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1095
1099
(parent ne null ) && parent.exists && parent.isDirectory,
1096
1100
s " Source file: $f, didn't exist "
1097
1101
)
1098
- val tastySource = createOutputDirsForFile(sourceFile, parent, outDir)
1102
+ val tastySource = createOutputDirsForFile(sourceFile, parent, outDir, flags )
1099
1103
val target = JointCompilationSource (
1100
1104
testGroup.name,
1101
1105
Array (sourceFile),
@@ -1180,8 +1184,8 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1180
1184
val (dirs, files) = compilationTargets(sourceDir)
1181
1185
1182
1186
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 )))
1185
1189
1186
1190
// Create a CompilationTest and let the user decide whether to execute a pos or a neg test
1187
1191
new CompilationTest (targets)
@@ -1217,7 +1221,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1217
1221
1218
1222
val targets =
1219
1223
files.map { f =>
1220
- val classpath = createOutputDirsForFile(f, sourceDir, outDir)
1224
+ val classpath = createOutputDirsForFile(f, sourceDir, outDir, flags )
1221
1225
JointCompilationSource (testGroup.name, Array (f), flags.withClasspath(classpath.getPath), classpath, fromTasty = true )
1222
1226
}
1223
1227
// TODO add SeparateCompilationSource from tasty?
@@ -1240,7 +1244,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1240
1244
val (_, files) = compilationTargets(sourceDir)
1241
1245
1242
1246
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 ))
1244
1248
}
1245
1249
1246
1250
// Create a CompilationTest and let the user decide whether to execute a pos or a neg test
0 commit comments