Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/test/dotty/tools/dotc/FromTastyTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class FromTastyTests {
// > scalac -Ythrough-tasty -Ycheck:all <source>

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()
}
Expand All @@ -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()
}
Expand Down
14 changes: 7 additions & 7 deletions compiler/test/dotty/tools/vulpix/ParallelTesting.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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?

Expand Down
Loading