@@ -1274,9 +1274,34 @@ 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
+ val runOrPos = if (file.getPath.startsWith(" tests/run/" )) " run" else " pos"
1288
+ val listName = if (fromTasty) " from-tasty" else " decompilation"
1289
+ s """ |
1290
+ |Test ' $title' compiled with $errors error(s) and $warnings warning(s),
1291
+ |the test can be reproduced by running:
1292
+ |
1293
+ | sbt "testFromTasty $file"
1294
+ |
1295
+ |This tests can be disabled by adding ` ${file.getName}` to `compiler/test/dotc/ $runOrPos- $listName.blacklist`
1296
+ |
1297
+ | """ .stripMargin
1298
+ }
1299
+
1300
+ }
1301
+
1277
1302
val targets = filteredFiles.map { f =>
1278
1303
val classpath = createOutputDirsForFile(f, sourceDir, outDir)
1279
- JointCompilationSource (testGroup.name, Array (f) , flags.withClasspath(classpath.getPath), classpath, fromTasty = true )
1304
+ new JointCompilationSourceFromTasty (testGroup.name, f , flags.withClasspath(classpath.getPath), classpath, fromTasty = true )
1280
1305
}
1281
1306
// TODO add SeparateCompilationSource from tasty?
1282
1307
@@ -1285,7 +1310,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1285
1310
.filter(f => decompilationFilter.accept(f.getName))
1286
1311
.map { f =>
1287
1312
val classpath = createOutputDirsForFile(f, sourceDir, outDir)
1288
- JointCompilationSource (testGroup.name, Array (f) , flags.withClasspath(classpath.getPath), classpath, decompilation = true )
1313
+ new JointCompilationSourceFromTasty (testGroup.name, f , flags.withClasspath(classpath.getPath), classpath, decompilation = true )
1289
1314
}
1290
1315
1291
1316
// Create a CompilationTest and let the user decide whether to execute a pos or a neg test
0 commit comments