From 0cbee8f44c4c29212cec667e6de2ca3473181a61 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Fri, 10 Nov 2023 11:26:56 +0100 Subject: [PATCH 1/2] Run all tests with Scala 2 library TASTy Run all tests with Scala 2 library TASTy with some failing tests blacklisted. --- .github/workflows/ci.yaml | 44 ++++++++++++++++++- .../test/dotc/scala2-library-tasty.blacklist | 30 +++++++++++++ compiler/test/dotty/Properties.scala | 3 ++ compiler/test/dotty/tools/TestSources.scala | 9 ++++ .../BootstrappedOnlyCompilationTests.scala | 2 +- .../dotty/tools/dotc/CompilationTests.scala | 13 +++--- .../tools/dotc/coverage/CoverageTests.scala | 9 ++++ .../transform/PatmatExhaustivityTest.scala | 2 + docs/_docs/contributing/sending-in-a-pr.md | 9 ++-- project/Build.scala | 2 +- 10 files changed, 111 insertions(+), 12 deletions(-) create mode 100644 compiler/test/dotc/scala2-library-tasty.blacklist diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1f556a290fc3..c47c047dfbfc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -142,9 +142,51 @@ jobs: run: | ./project/scripts/sbt ";sjsSandbox/run ;sjsSandbox/test ;sjsJUnitTests/test ;set sjsJUnitTests/scalaJSLinkerConfig ~= switchToESModules ;sjsJUnitTests/test ;sjsCompilerTests/test" - - name: Test with Scala 2 library TASTy + - name: Test with Scala 2 library TASTy (fast) run: ./project/scripts/sbt ";set ThisBuild/Build.useScala2LibraryTasty := true ;scala3-bootstrapped/testCompilation i5; scala3-bootstrapped/testCompilation tests/run/typelevel-peano.scala" # only test a subset of test to avoid doubling the CI execution time + test_scala2_library_tasty: + runs-on: [self-hosted, Linux] + container: + image: lampepfl/dotty:2021-03-22 + options: --cpu-shares 4096 + volumes: + - ${{ github.workspace }}/../../cache/sbt:/root/.sbt + - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache + - ${{ github.workspace }}/../../cache/general:/root/.cache + if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty' + || ( + github.event_name == 'pull_request' + && contains(github.event.pull_request.body, '[test_scala2_library_tasty]') + ) + || ( + github.event_name == 'workflow_dispatch' + && github.repository == 'lampepfl/dotty' + )" + + steps: + - name: Set JDK 16 as default + run: echo "/usr/lib/jvm/java-16-openjdk-amd64/bin" >> $GITHUB_PATH + + - name: Reset existing repo + run: git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true + + - name: Checkout cleanup script + uses: actions/checkout@v3 + + - name: Cleanup + run: .github/workflows/cleanup.sh + + - name: Git Checkout + uses: actions/checkout@v3 + + - name: Add SBT proxy repositories + run: cp -vf .github/workflows/repositories /root/.sbt/ ; true + + - name: Test with Scala 2 library TASTy + run: ./project/scripts/sbt ";set ThisBuild/Build.useScala2LibraryTasty := true ;scala3-bootstrapped/testCompilation" + + test_windows_fast: runs-on: [self-hosted, Windows] if: "( diff --git a/compiler/test/dotc/scala2-library-tasty.blacklist b/compiler/test/dotc/scala2-library-tasty.blacklist new file mode 100644 index 000000000000..53988852f36c --- /dev/null +++ b/compiler/test/dotc/scala2-library-tasty.blacklist @@ -0,0 +1,30 @@ +## tests/run-macros +tasty-extractors-1 +tasty-extractors-2 +tasty-extractors-types + +## tests/neg +i8752.scala +f-interpolator-neg.scala # Additional: A pure expression does nothing in statement position + +## (#18882) tests/init-global/neg +t9312.scala +unapplySeq-implicit-arg.scala +unapplySeq-implicit-arg2.scala +unapplySeq-implicit-arg3.scala + +## (#18882) tests/init-global/pos +patmat.scala +patmat-interpolator.scala +unapplySeq-implicit-arg-pos.scala +global-cycle11.scala + +## tests/patmat +t7746.scala # order of exhaustivity suggestions differs +t4408.scala # order of exhaustivity suggestions differs +patmat-ortype.scala # order of exhaustivity suggestions differs +i13003.scala # order of exhaustivity suggestions differs + +## Other issues +# - CompilationTests.pos: tests/pos-special/stdlib +# - CoverageTests.checkInstrumentedRuns diff --git a/compiler/test/dotty/Properties.scala b/compiler/test/dotty/Properties.scala index c1d757378919..4bb3628722ad 100644 --- a/compiler/test/dotty/Properties.scala +++ b/compiler/test/dotty/Properties.scala @@ -85,6 +85,9 @@ object Properties { /** scala-library TASTy jar */ def scalaLibraryTasty: Option[String] = sys.props.get("dotty.tests.tasties.scalaLibrary") + /** If we are using the scala-library TASTy jar */ + def usingScalaLibraryTasty: Boolean = scalaLibraryTasty.isDefined + /** scala-asm jar */ def scalaAsm: String = sys.props("dotty.tests.classes.scalaAsm") diff --git a/compiler/test/dotty/tools/TestSources.scala b/compiler/test/dotty/tools/TestSources.scala index 68a260de81e4..289359dab132 100644 --- a/compiler/test/dotty/tools/TestSources.scala +++ b/compiler/test/dotty/tools/TestSources.scala @@ -6,6 +6,7 @@ import java.io.File import java.nio.file._ import scala.jdk.CollectionConverters._ +import dotty.Properties object TestSources { @@ -36,6 +37,14 @@ object TestSources { def runTestRecheckExcluded: List[String] = loadList(runTestRecheckExcludesFile) def runLazyValsAllowlist: List[String] = loadList(runLazyValsAllowlistFile) + // other lists + + def scala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/scala2-library-tasty.blacklist" + + def scala2LibraryTastyBlacklisted: List[String] = + if Properties.usingScalaLibraryTasty then loadList(scala2LibraryTastyBlacklistFile) + else Nil + // load lists private def loadList(path: String): List[String] = { diff --git a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala index 88b9fe0c649d..7aefae6ee39d 100644 --- a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala @@ -120,7 +120,7 @@ class BootstrappedOnlyCompilationTests { @Test def runMacros: Unit = { implicit val testGroup: TestGroup = TestGroup("runMacros") - compileFilesInDir("tests/run-macros", defaultOptions.and("-Xcheck-macros")) + compileFilesInDir("tests/run-macros", defaultOptions.and("-Xcheck-macros"), FileFilter.exclude(TestSources.scala2LibraryTastyBlacklisted)) .checkRuns() } diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index 9a305a926a9c..764e85cca9ca 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -44,7 +44,10 @@ class CompilationTests { // Run tests for legacy lazy vals compileFilesInDir("tests/pos", defaultOptions.and("-Ysafe-init", "-Ylegacy-lazy-vals", "-Ycheck-constraint-deps"), FileFilter.include(TestSources.posLazyValsAllowlist)), compileDir("tests/pos-special/java-param-names", defaultOptions.withJavacOnlyOptions("-parameters")), - compileDir("tests/pos-special/stdlib", allowDeepSubtypes), + ) ::: ( + // FIXME: This fails due to a bug involving self types and capture checking + if Properties.usingScalaLibraryTasty then Nil + else List(compileDir("tests/pos-special/stdlib", allowDeepSubtypes)) ) if scala.util.Properties.isJavaAtLeast("16") then @@ -130,7 +133,7 @@ class CompilationTests { @Test def negAll: Unit = { implicit val testGroup: TestGroup = TestGroup("compileNeg") aggregateTests( - compileFilesInDir("tests/neg", defaultOptions), + compileFilesInDir("tests/neg", defaultOptions, FileFilter.exclude(TestSources.scala2LibraryTastyBlacklisted)), compileFilesInDir("tests/neg-deep-subtype", allowDeepSubtypes), compileFilesInDir("tests/neg-custom-args/captures", defaultOptions.and("-language:experimental.captureChecking")), compileFile("tests/neg-custom-args/sourcepath/outer/nested/Test1.scala", defaultOptions.and("-sourcepath", "tests/neg-custom-args/sourcepath")), @@ -153,7 +156,7 @@ class CompilationTests { @Test def runAll: Unit = { implicit val testGroup: TestGroup = TestGroup("runAll") aggregateTests( - compileFilesInDir("tests/run", defaultOptions.and("-Ysafe-init")), + compileFilesInDir("tests/run", defaultOptions.and("-Ysafe-init"), FileFilter.exclude(TestSources.scala2LibraryTastyBlacklisted)), compileFilesInDir("tests/run-deep-subtype", allowDeepSubtypes), compileFilesInDir("tests/run-custom-args/captures", allowDeepSubtypes.and("-language:experimental.captureChecking")), // Run tests for legacy lazy vals. @@ -213,8 +216,8 @@ class CompilationTests { @Test def checkInitGlobal: Unit = { implicit val testGroup: TestGroup = TestGroup("checkInitGlobal") val options = defaultOptions.and("-Ysafe-init-global", "-Xfatal-warnings") - compileFilesInDir("tests/init-global/neg", options).checkExpectedErrors() - compileFilesInDir("tests/init-global/pos", options).checkCompile() + compileFilesInDir("tests/init-global/neg", options, FileFilter.exclude(TestSources.scala2LibraryTastyBlacklisted)).checkExpectedErrors() + compileFilesInDir("tests/init-global/pos", options, FileFilter.exclude(TestSources.scala2LibraryTastyBlacklisted)).checkCompile() } // initialization tests diff --git a/compiler/test/dotty/tools/dotc/coverage/CoverageTests.scala b/compiler/test/dotty/tools/dotc/coverage/CoverageTests.scala index a14d40776358..7efa1f6f564e 100644 --- a/compiler/test/dotty/tools/dotc/coverage/CoverageTests.scala +++ b/compiler/test/dotty/tools/dotc/coverage/CoverageTests.scala @@ -3,6 +3,7 @@ package dotty.tools.dotc.coverage import org.junit.Test import org.junit.AfterClass import org.junit.Assert.* +import org.junit.Assume.* import org.junit.experimental.categories.Category import dotty.{BootstrappedOnlyTests, Properties} import dotty.tools.vulpix.* @@ -28,10 +29,18 @@ class CoverageTests: @Test def checkCoverageStatements(): Unit = + assumeFalse( + "FIXME: test output differs when using Scala 2 library TASTy", + Properties.usingScalaLibraryTasty + ) checkCoverageIn(rootSrc.resolve("pos"), false) @Test def checkInstrumentedRuns(): Unit = + assumeFalse( + "FIXME: test output differs when using Scala 2 library TASTy", + Properties.usingScalaLibraryTasty + ) checkCoverageIn(rootSrc.resolve("run"), true) def checkCoverageIn(dir: Path, run: Boolean)(using TestGroup): Unit = diff --git a/compiler/test/dotty/tools/dotc/transform/PatmatExhaustivityTest.scala b/compiler/test/dotty/tools/dotc/transform/PatmatExhaustivityTest.scala index 1e7d7ef2c708..66aed6e9973d 100644 --- a/compiler/test/dotty/tools/dotc/transform/PatmatExhaustivityTest.scala +++ b/compiler/test/dotty/tools/dotc/transform/PatmatExhaustivityTest.scala @@ -63,12 +63,14 @@ class PatmatExhaustivityTest { @Test def patmatExhaustivity: Unit = { + val blacklisted = TestSources.scala2LibraryTastyBlacklisted.toSet val res = Directory(testsDir).list.toList .filter(f => f.extension == "scala" || f.isDirectory) .filter { f => val path = if f.isDirectory then f.path + "/" else f.path Properties.testsFilter.isEmpty || Properties.testsFilter.exists(path.contains) } + .filterNot(f => blacklisted.contains(f.name)) .map(f => if f.isDirectory then compileDir(f.jpath) else compileFile(f.jpath)) val failed = res.filter(!_) diff --git a/docs/_docs/contributing/sending-in-a-pr.md b/docs/_docs/contributing/sending-in-a-pr.md index fc7bf2e26de3..c99e6a28172b 100644 --- a/docs/_docs/contributing/sending-in-a-pr.md +++ b/docs/_docs/contributing/sending-in-a-pr.md @@ -125,10 +125,11 @@ Below are commonly used ones: Depending on what your PR is addressing, sometimes it doesn't make sense to run parts of the CI that usually ony runs on nightly builds. -|---------------------------|----------------------------------------------------| -| `[test_java8]` | Execute unit tests on Java 8 | -| `[test_windows_full]` | Execute unit tests on Windows | -| `[test_non_bootstrapped]` | Execute unit tests using non-bootstrapped compiler | +|-------------------------------|---------------------------------------------------------------------------| +| `[test_java8]` | Execute unit tests on Java 8 | +| `[test_windows_full]` | Execute unit tests on Windows | +| `[test_non_bootstrapped]` | Execute unit tests using non-bootstrapped compiler | +| `[test_scala2_library_tasty]` | Execute unit tests using bootstrapped-compiler with Scala 2 library TASTy | ### 7: Create your PR! diff --git a/project/Build.scala b/project/Build.scala index 7066deb8f7c2..6d76e6e8ebac 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -176,7 +176,7 @@ object Build { // Use the TASTy jar from `scala2-library-tasty` in the classpath // This only works with `scala3-bootstrapped/scalac` and tests in `scala3-bootstrapped` // - // Enable in SBT with: set ThisBuild/Build.useScala2LibraryTasty := true + // Enable in SBT with: `set ThisBuild/Build.useScala2LibraryTasty := true` val useScala2LibraryTasty = settingKey[Boolean]("Use the TASTy jar from `scala2-library-tasty` in the classpath") // Used to compile files similar to ./bin/scalac script From 726da0c78b89abf53b8e3871dd1b93a66451614f Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Fri, 17 Nov 2023 14:23:53 +0100 Subject: [PATCH 2/2] Split blacklist --- ...init-global-scala2-library-tasty.blacklist | 6 ++++ .../dotc/neg-scala2-library-tasty.blacklist | 2 ++ ...xhaustivity-scala2-library-tasty.blacklist | 4 +++ ...init-global-scala2-library-tasty.blacklist | 5 ++++ .../run-macros-scala2-library-tasty.blacklist | 4 +++ .../test/dotc/scala2-library-tasty.blacklist | 30 ------------------- compiler/test/dotty/tools/TestSources.scala | 29 ++++++++++++++---- .../BootstrappedOnlyCompilationTests.scala | 2 +- .../dotty/tools/dotc/CompilationTests.scala | 8 ++--- .../transform/PatmatExhaustivityTest.scala | 2 +- 10 files changed, 51 insertions(+), 41 deletions(-) create mode 100644 compiler/test/dotc/neg-init-global-scala2-library-tasty.blacklist create mode 100644 compiler/test/dotc/neg-scala2-library-tasty.blacklist create mode 100644 compiler/test/dotc/patmat-exhaustivity-scala2-library-tasty.blacklist create mode 100644 compiler/test/dotc/pos-init-global-scala2-library-tasty.blacklist create mode 100644 compiler/test/dotc/run-macros-scala2-library-tasty.blacklist delete mode 100644 compiler/test/dotc/scala2-library-tasty.blacklist diff --git a/compiler/test/dotc/neg-init-global-scala2-library-tasty.blacklist b/compiler/test/dotc/neg-init-global-scala2-library-tasty.blacklist new file mode 100644 index 000000000000..f435867fcaab --- /dev/null +++ b/compiler/test/dotc/neg-init-global-scala2-library-tasty.blacklist @@ -0,0 +1,6 @@ +## See #18882 +patmat.scala +t9312.scala +unapplySeq-implicit-arg.scala +unapplySeq-implicit-arg2.scala +unapplySeq-implicit-arg3.scala diff --git a/compiler/test/dotc/neg-scala2-library-tasty.blacklist b/compiler/test/dotc/neg-scala2-library-tasty.blacklist new file mode 100644 index 000000000000..d46a021ddd50 --- /dev/null +++ b/compiler/test/dotc/neg-scala2-library-tasty.blacklist @@ -0,0 +1,2 @@ +i8752.scala +f-interpolator-neg.scala # Additional: A pure expression does nothing in statement position diff --git a/compiler/test/dotc/patmat-exhaustivity-scala2-library-tasty.blacklist b/compiler/test/dotc/patmat-exhaustivity-scala2-library-tasty.blacklist new file mode 100644 index 000000000000..6f1717d532fd --- /dev/null +++ b/compiler/test/dotc/patmat-exhaustivity-scala2-library-tasty.blacklist @@ -0,0 +1,4 @@ +t7746.scala # order of exhaustivity suggestions differs +t4408.scala # order of exhaustivity suggestions differs +patmat-ortype.scala # order of exhaustivity suggestions differs +i13003.scala # order of exhaustivity suggestions differs diff --git a/compiler/test/dotc/pos-init-global-scala2-library-tasty.blacklist b/compiler/test/dotc/pos-init-global-scala2-library-tasty.blacklist new file mode 100644 index 000000000000..eb60fc3b7c14 --- /dev/null +++ b/compiler/test/dotc/pos-init-global-scala2-library-tasty.blacklist @@ -0,0 +1,5 @@ +## See #18882 +patmat.scala +patmat-interpolator.scala +unapplySeq-implicit-arg-pos.scala +global-cycle11.scala diff --git a/compiler/test/dotc/run-macros-scala2-library-tasty.blacklist b/compiler/test/dotc/run-macros-scala2-library-tasty.blacklist new file mode 100644 index 000000000000..63a6e2cee345 --- /dev/null +++ b/compiler/test/dotc/run-macros-scala2-library-tasty.blacklist @@ -0,0 +1,4 @@ +# Checkfile differences for equivalent type +tasty-extractors-1 +tasty-extractors-2 +tasty-extractors-types diff --git a/compiler/test/dotc/scala2-library-tasty.blacklist b/compiler/test/dotc/scala2-library-tasty.blacklist deleted file mode 100644 index 53988852f36c..000000000000 --- a/compiler/test/dotc/scala2-library-tasty.blacklist +++ /dev/null @@ -1,30 +0,0 @@ -## tests/run-macros -tasty-extractors-1 -tasty-extractors-2 -tasty-extractors-types - -## tests/neg -i8752.scala -f-interpolator-neg.scala # Additional: A pure expression does nothing in statement position - -## (#18882) tests/init-global/neg -t9312.scala -unapplySeq-implicit-arg.scala -unapplySeq-implicit-arg2.scala -unapplySeq-implicit-arg3.scala - -## (#18882) tests/init-global/pos -patmat.scala -patmat-interpolator.scala -unapplySeq-implicit-arg-pos.scala -global-cycle11.scala - -## tests/patmat -t7746.scala # order of exhaustivity suggestions differs -t4408.scala # order of exhaustivity suggestions differs -patmat-ortype.scala # order of exhaustivity suggestions differs -i13003.scala # order of exhaustivity suggestions differs - -## Other issues -# - CompilationTests.pos: tests/pos-special/stdlib -# - CoverageTests.checkInstrumentedRuns diff --git a/compiler/test/dotty/tools/TestSources.scala b/compiler/test/dotty/tools/TestSources.scala index 289359dab132..a288e49c5eb9 100644 --- a/compiler/test/dotty/tools/TestSources.scala +++ b/compiler/test/dotty/tools/TestSources.scala @@ -17,12 +17,16 @@ object TestSources { def posTestRecheckExcludesFile: String = "compiler/test/dotc/pos-test-recheck.excludes" def posLazyValsAllowlistFile: String = "compiler/test/dotc/pos-lazy-vals-tests.allowlist" def posLintingAllowlistFile: String = "compiler/test/dotc/pos-linting.allowlist" + def posInitGlobalScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/pos-init-global-scala2-library-tasty.blacklist" def posFromTastyBlacklisted: List[String] = loadList(posFromTastyBlacklistFile) def posTestPicklingBlacklisted: List[String] = loadList(posTestPicklingBlacklistFile) def posTestRecheckExcluded: List[String] = loadList(posTestRecheckExcludesFile) def posLazyValsAllowlist: List[String] = loadList(posLazyValsAllowlistFile) def posLintingAllowlist: List[String] = loadList(posLintingAllowlistFile) + def posInitGlobalScala2LibraryTastyBlacklisted: List[String] = + if Properties.usingScalaLibraryTasty then loadList(posInitGlobalScala2LibraryTastyBlacklistFile) + else Nil // run tests lists @@ -30,19 +34,34 @@ object TestSources { def runTestPicklingBlacklistFile: String = "compiler/test/dotc/run-test-pickling.blacklist" def runTestRecheckExcludesFile: String = "compiler/test/dotc/run-test-recheck.excludes" def runLazyValsAllowlistFile: String = "compiler/test/dotc/run-lazy-vals-tests.allowlist" - + def runMacrosScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/run-macros-scala2-library-tasty.blacklist" def runFromTastyBlacklisted: List[String] = loadList(runFromTastyBlacklistFile) def runTestPicklingBlacklisted: List[String] = loadList(runTestPicklingBlacklistFile) def runTestRecheckExcluded: List[String] = loadList(runTestRecheckExcludesFile) def runLazyValsAllowlist: List[String] = loadList(runLazyValsAllowlistFile) + def runMacrosScala2LibraryTastyBlacklisted: List[String] = + if Properties.usingScalaLibraryTasty then loadList(runMacrosScala2LibraryTastyBlacklistFile) + else Nil + + // neg tests lists + + def negScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/neg-scala2-library-tasty.blacklist" + def negInitGlobalScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/neg-init-global-scala2-library-tasty.blacklist" + + def negScala2LibraryTastyBlacklisted: List[String] = + if Properties.usingScalaLibraryTasty then loadList(negScala2LibraryTastyBlacklistFile) + else Nil + def negInitGlobalScala2LibraryTastyBlacklisted: List[String] = + if Properties.usingScalaLibraryTasty then loadList(negInitGlobalScala2LibraryTastyBlacklistFile) + else Nil - // other lists + // patmat tests lists - def scala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/scala2-library-tasty.blacklist" + def patmatExhaustivityScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/patmat-exhaustivity-scala2-library-tasty.blacklist" - def scala2LibraryTastyBlacklisted: List[String] = - if Properties.usingScalaLibraryTasty then loadList(scala2LibraryTastyBlacklistFile) + def patmatExhaustivityScala2LibraryTastyBlacklisted: List[String] = + if Properties.usingScalaLibraryTasty then loadList(patmatExhaustivityScala2LibraryTastyBlacklistFile) else Nil // load lists diff --git a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala index 7aefae6ee39d..ab2adddbb16e 100644 --- a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala @@ -120,7 +120,7 @@ class BootstrappedOnlyCompilationTests { @Test def runMacros: Unit = { implicit val testGroup: TestGroup = TestGroup("runMacros") - compileFilesInDir("tests/run-macros", defaultOptions.and("-Xcheck-macros"), FileFilter.exclude(TestSources.scala2LibraryTastyBlacklisted)) + compileFilesInDir("tests/run-macros", defaultOptions.and("-Xcheck-macros"), FileFilter.exclude(TestSources.runMacrosScala2LibraryTastyBlacklisted)) .checkRuns() } diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index 764e85cca9ca..41b8de0d6138 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -133,7 +133,7 @@ class CompilationTests { @Test def negAll: Unit = { implicit val testGroup: TestGroup = TestGroup("compileNeg") aggregateTests( - compileFilesInDir("tests/neg", defaultOptions, FileFilter.exclude(TestSources.scala2LibraryTastyBlacklisted)), + compileFilesInDir("tests/neg", defaultOptions, FileFilter.exclude(TestSources.negScala2LibraryTastyBlacklisted)), compileFilesInDir("tests/neg-deep-subtype", allowDeepSubtypes), compileFilesInDir("tests/neg-custom-args/captures", defaultOptions.and("-language:experimental.captureChecking")), compileFile("tests/neg-custom-args/sourcepath/outer/nested/Test1.scala", defaultOptions.and("-sourcepath", "tests/neg-custom-args/sourcepath")), @@ -156,7 +156,7 @@ class CompilationTests { @Test def runAll: Unit = { implicit val testGroup: TestGroup = TestGroup("runAll") aggregateTests( - compileFilesInDir("tests/run", defaultOptions.and("-Ysafe-init"), FileFilter.exclude(TestSources.scala2LibraryTastyBlacklisted)), + compileFilesInDir("tests/run", defaultOptions.and("-Ysafe-init")), compileFilesInDir("tests/run-deep-subtype", allowDeepSubtypes), compileFilesInDir("tests/run-custom-args/captures", allowDeepSubtypes.and("-language:experimental.captureChecking")), // Run tests for legacy lazy vals. @@ -216,8 +216,8 @@ class CompilationTests { @Test def checkInitGlobal: Unit = { implicit val testGroup: TestGroup = TestGroup("checkInitGlobal") val options = defaultOptions.and("-Ysafe-init-global", "-Xfatal-warnings") - compileFilesInDir("tests/init-global/neg", options, FileFilter.exclude(TestSources.scala2LibraryTastyBlacklisted)).checkExpectedErrors() - compileFilesInDir("tests/init-global/pos", options, FileFilter.exclude(TestSources.scala2LibraryTastyBlacklisted)).checkCompile() + compileFilesInDir("tests/init-global/neg", options, FileFilter.exclude(TestSources.negInitGlobalScala2LibraryTastyBlacklisted)).checkExpectedErrors() + compileFilesInDir("tests/init-global/pos", options, FileFilter.exclude(TestSources.posInitGlobalScala2LibraryTastyBlacklisted)).checkCompile() } // initialization tests diff --git a/compiler/test/dotty/tools/dotc/transform/PatmatExhaustivityTest.scala b/compiler/test/dotty/tools/dotc/transform/PatmatExhaustivityTest.scala index 66aed6e9973d..f538d9534cd9 100644 --- a/compiler/test/dotty/tools/dotc/transform/PatmatExhaustivityTest.scala +++ b/compiler/test/dotty/tools/dotc/transform/PatmatExhaustivityTest.scala @@ -63,7 +63,7 @@ class PatmatExhaustivityTest { @Test def patmatExhaustivity: Unit = { - val blacklisted = TestSources.scala2LibraryTastyBlacklisted.toSet + val blacklisted = TestSources.patmatExhaustivityScala2LibraryTastyBlacklisted.toSet val res = Directory(testsDir).list.toList .filter(f => f.extension == "scala" || f.isDirectory) .filter { f =>