diff --git a/compiler/test/dotty/tools/dotc/FromTastyTests.scala b/compiler/test/dotty/tools/dotc/FromTastyTests.scala index fa1d9acff316..dd7fe64e50e4 100644 --- a/compiler/test/dotty/tools/dotc/FromTastyTests.scala +++ b/compiler/test/dotty/tools/dotc/FromTastyTests.scala @@ -22,7 +22,7 @@ class FromTastyTests { // > scalac -Ythrough-tasty -Ycheck:all implicit val testGroup: TestGroup = TestGroup("posTestFromTasty") - compileTastyInDir(s"tests${JFile.separator}pos", defaultOptions, + compileTastyInDir(s"tests${JFile.separator}pos", defaultOptions.and("-experimental"), fromTastyFilter = FileFilter.exclude(TestSources.posFromTastyExcludelisted) ).checkCompile() } @@ -34,7 +34,7 @@ class FromTastyTests { // > scala Test implicit val testGroup: TestGroup = TestGroup("runTestFromTasty") - compileTastyInDir(s"tests${JFile.separator}run", defaultOptions, + compileTastyInDir(s"tests${JFile.separator}run", defaultOptions.and("-experimental"), fromTastyFilter = FileFilter.exclude(TestSources.runFromTastyExcludelisted) ).checkRuns() } diff --git a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala index 3a2f261a8e16..8e87f957ba74 100644 --- a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala +++ b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala @@ -1570,30 +1570,30 @@ trait ParallelTesting extends RunnerOrchestration: val sourceDir = new JFile(f) checkRequirements(f, sourceDir, outDir) - val (dirs, files) = compilationTargets(sourceDir, fromTastyFilter) + val (_, files) = compilationTargets(sourceDir, fromTastyFilter) val filteredFiles = testFilter match case _ :: _ => files.filter(f => testFilter.exists(f.getPath.contains)) - case _ => Nil + case _ => files + + assert(filteredFiles.nonEmpty) class JointCompilationSourceFromTasty( name: String, file: JFile, flags: TestFlags, outDir: JFile, - fromTasty: Boolean = false, - ) extends JointCompilationSource(name, Array(file), flags, outDir, if (fromTasty) FromTasty else NotFromTasty) { + ) extends JointCompilationSource(name, Array(file), flags, outDir, FromTasty) { override def buildInstructions(errors: Int, warnings: Int): String = { val runOrPos = if (file.getPath.startsWith(s"tests${JFile.separator}run${JFile.separator}")) "run" else "pos" - val listName = if (fromTasty) "from-tasty" else "decompilation" s"""| |Test '$title' compiled with $errors error(s) and $warnings warning(s), |the test can be reproduced by running: | | sbt "testCompilation --from-tasty $file" | - |This tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}$runOrPos-$listName.excludelist` + |This tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}$runOrPos-from-tasty.excludelist` | |""".stripMargin } @@ -1602,7 +1602,7 @@ trait ParallelTesting extends RunnerOrchestration: val targets = filteredFiles.map { f => val classpath = createOutputDirsForFile(f, sourceDir, outDir) - new JointCompilationSourceFromTasty(testGroup.name, f, flags.withClasspath(classpath.getPath), classpath, fromTasty = true) + new JointCompilationSourceFromTasty(testGroup.name, f, flags.withClasspath(classpath.getPath), classpath) } // TODO add SeparateCompilationSource from tasty?