@@ -425,16 +425,17 @@ trait ParallelTesting extends RunnerOrchestration { self =>
425425 reporter
426426 }
427427
428- protected def decompile (flags0 : TestFlags , suppressErrors : Boolean , targetDir : JFile ): TestReporter = {
429- val decompilationOutput = new JFile (targetDir.getPath)
430- decompilationOutput.mkdir()
428+ protected def decompile (flags0 : TestFlags , suppressErrors : Boolean , targetDir0 : JFile ): TestReporter = {
429+ val targetDir = new JFile (targetDir0.getParent + " _decompiled" )
430+ val decompilationOutput = new JFile (targetDir + " /" + targetDir0.getName)
431+ decompilationOutput.mkdirs()
431432 val flags =
432433 flags0 and (" -d" , decompilationOutput.getAbsolutePath) and
433434 " -decompile" and " -pagewidth" and " 80"
434435
435436 def hasTastyFileToClassName (f : JFile ): String =
436- targetDir .toPath.relativize(f.toPath).toString.dropRight(" .hasTasty" .length).replace('/' , '.' )
437- val classes = flattenFiles(targetDir ).filter(isHasTastyFile).map(hasTastyFileToClassName).sorted
437+ targetDir0 .toPath.relativize(f.toPath).toString.dropRight(" .hasTasty" .length).replace('/' , '.' )
438+ val classes = flattenFiles(targetDir0 ).filter(isHasTastyFile).map(hasTastyFileToClassName).sorted
438439
439440 val reporter =
440441 TestReporter .reporter(realStdout, logLevel =
@@ -522,7 +523,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
522523 checkFileOpt match {
523524 case Some (checkFile) =>
524525 val stripTrailingWhitespaces = " (.*\\ S|)\\ s+" .r
525- val output = Source .fromFile(outDir + " . decompiled" ).getLines().map {line =>
526+ val output = Source .fromFile(outDir.getParent + " _decompiled/ " + outDir.getName + " / decompiled.scala " ).getLines().map {line =>
526527 stripTrailingWhitespaces.unapplySeq(line).map(_.head).getOrElse(line)
527528 }.mkString(" \n " )
528529
@@ -1257,8 +1258,8 @@ trait ParallelTesting extends RunnerOrchestration { self =>
12571258 * Tests in the first part of the tuple must be executed before the second.
12581259 * Both testsRequires explicit delete().
12591260 */
1260- def compileTastyInDir (f : String , flags0 : TestFlags , blacklist : Set [String ] = Set .empty )(
1261- implicit testGroup : TestGroup ): (CompilationTest , CompilationTest , CompilationTest ) = {
1261+ def compileTastyInDir (f : String , flags0 : TestFlags , blacklist : Set [String ], recompileBlacklist : Set [ String ] )(
1262+ implicit testGroup : TestGroup ): (CompilationTest , CompilationTest , CompilationTest , CompilationTest ) = {
12621263 val outDir = defaultOutputDir + testGroup + " /"
12631264 val flags = flags0 and " -Yretain-trees"
12641265 val sourceDir = new JFile (f)
@@ -1284,10 +1285,15 @@ trait ParallelTesting extends RunnerOrchestration { self =>
12841285 // Create a CompilationTest and let the user decide whether to execute a pos or a neg test
12851286 val generateClassFiles = compileFilesInDir(f, flags0, blacklist)
12861287
1288+ val decompilationDir = outDir + sourceDir.getName + " _decompiled"
1289+ new JFile (decompilationDir).mkdirs()
1290+ val recompileDecompiled = compileFilesInDir(decompilationDir, flags0, recompileBlacklist)
1291+
12871292 (
12881293 generateClassFiles.keepOutput,
12891294 new CompilationTest (targets).keepOutput,
1290- new CompilationTest (targets2).keepOutput
1295+ new CompilationTest (targets2).keepOutput,
1296+ recompileDecompiled.keepOutput
12911297 )
12921298 }
12931299
0 commit comments