@@ -1274,9 +1274,34 @@ trait ParallelTesting extends RunnerOrchestration { self =>
12741274 case None => files
12751275 }
12761276
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+
12771302 val targets = filteredFiles.map { f =>
12781303 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 )
12801305 }
12811306 // TODO add SeparateCompilationSource from tasty?
12821307
@@ -1285,7 +1310,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
12851310 .filter(f => decompilationFilter.accept(f.getName))
12861311 .map { f =>
12871312 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 )
12891314 }
12901315
12911316 // Create a CompilationTest and let the user decide whether to execute a pos or a neg test
0 commit comments