@@ -1274,9 +1274,30 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1274
1274
case None => files
1275
1275
}
1276
1276
1277
+ class JointCompilationSourceFromTasty (
1278
+ name : String ,
1279
+ file : JFile ,
1280
+ flags : TestFlags ,
1281
+ outDir : JFile ,
1282
+ fromTasty : Boolean = false ,
1283
+ decompilation : Boolean = false
1284
+ ) extends JointCompilationSource (name, Array (file), flags, outDir, fromTasty, decompilation) {
1285
+
1286
+ override def buildInstructions (errors : Int , warnings : Int ): String = {
1287
+ s """ |
1288
+ |Test ' $title' compiled with $errors error(s) and $warnings warning(s),
1289
+ |the test can be reproduced by running:
1290
+ |
1291
+ | sbt "testFromTasty $file"
1292
+ |
1293
+ | """ .stripMargin
1294
+ }
1295
+
1296
+ }
1297
+
1277
1298
val targets = filteredFiles.map { f =>
1278
1299
val classpath = createOutputDirsForFile(f, sourceDir, outDir)
1279
- JointCompilationSource (testGroup.name, Array (f) , flags.withClasspath(classpath.getPath), classpath, fromTasty = true )
1300
+ new JointCompilationSourceFromTasty (testGroup.name, f , flags.withClasspath(classpath.getPath), classpath, fromTasty = true )
1280
1301
}
1281
1302
// TODO add SeparateCompilationSource from tasty?
1282
1303
@@ -1285,7 +1306,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1285
1306
.filter(f => dotty.tools.io.File (f.toPath).changeExtension(" decompiled" ).exists)
1286
1307
.map { f =>
1287
1308
val classpath = createOutputDirsForFile(f, sourceDir, outDir)
1288
- JointCompilationSource (testGroup.name, Array (f) , flags.withClasspath(classpath.getPath), classpath, decompilation = true )
1309
+ new JointCompilationSourceFromTasty (testGroup.name, f , flags.withClasspath(classpath.getPath), classpath, decompilation = true )
1289
1310
}
1290
1311
1291
1312
// Create a CompilationTest and let the user decide whether to execute a pos or a neg test
0 commit comments