@@ -52,10 +52,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
52
52
def outDir : JFile
53
53
def flags : TestFlags
54
54
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
59
56
60
57
def title : String = self match {
61
58
case self : JointCompilationSource =>
@@ -1008,18 +1005,22 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1008
1005
}
1009
1006
1010
1007
/** 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 = {
1012
1009
val targetDir = new JFile (outDir + s " ${sourceDir.getName}/ ${d.getName}" )
1013
1010
targetDir.mkdirs()
1014
- targetDir
1011
+ jaredIfNeeded( targetDir, flags)
1015
1012
}
1016
1013
1017
1014
/** 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 = {
1019
1016
val uniqueSubdir = file.getName.substring(0 , file.getName.lastIndexOf('.' ))
1020
1017
val targetDir = new JFile (outDir + s " ${sourceDir.getName}/ $uniqueSubdir" )
1021
1018
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 " " ))
1023
1024
}
1024
1025
1025
1026
/** Make sure that directory string is as expected */
@@ -1081,7 +1082,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1081
1082
callingMethod,
1082
1083
Array (sourceFile),
1083
1084
flags,
1084
- createOutputDirsForFile(sourceFile, parent, outDir)
1085
+ createOutputDirsForFile(sourceFile, parent, outDir, flags )
1085
1086
)
1086
1087
new CompilationTest (target)
1087
1088
}
@@ -1161,9 +1162,11 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1161
1162
1162
1163
val (dirs, files) = compilationTargets(sourceDir)
1163
1164
1165
+ def createOutputDirsFor (f : JFile ): JFile = createOutputDirsForFile(f, sourceDir, outDir, flags)
1166
+
1164
1167
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 )))
1167
1170
1168
1171
// Create a CompilationTest and let the user decide whether to execute a pos or a neg test
1169
1172
new CompilationTest (targets)
@@ -1182,7 +1185,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1182
1185
val (_, files) = compilationTargets(sourceDir)
1183
1186
1184
1187
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 ))
1186
1189
}
1187
1190
1188
1191
// Create a CompilationTest and let the user decide whether to execute a pos or a neg test
0 commit comments