From d0fae847e052731a9294ab4e417a0c11654735db Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Wed, 10 Apr 2024 16:03:04 +0200 Subject: [PATCH] Try to avoid timeouts in `scala2-library-from-tasty*.scala` Run these tests on their own to reduce the risk of timeouts. --- .../tools/dotc/BootstrappedOnlyCompilationTests.scala | 10 ++++++++++ .../scala2-library-from-tasty-jar.scala | 0 .../scala2-library-from-tasty.scala | 0 3 files changed, 10 insertions(+) rename tests/{run-with-compiler => run-custom-args}/scala2-library-from-tasty-jar.scala (100%) rename tests/{run-with-compiler => run-custom-args}/scala2-library-from-tasty.scala (100%) diff --git a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala index 5e9a01a77ca7..a40c1ec1e5b2 100644 --- a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala @@ -138,6 +138,16 @@ class BootstrappedOnlyCompilationTests { aggregateTests(tests*).checkRuns() } + @Test def runScala2LibraryFromTasty: Unit = { + implicit val testGroup: TestGroup = TestGroup("runScala2LibraryFromTasty") + // These tests recompile the entire scala2-library from TASTy, + // they are resource intensive and should not run alongside other tests to avoid timeouts + aggregateTests( + compileFile("tests/run-custom-args/scala2-library-from-tasty-jar.scala", withCompilerOptions), + compileFile("tests/run-custom-args/scala2-library-from-tasty.scala", withCompilerOptions), + ).limitThreads(2).checkRuns() // TODO reduce to limitThreads(1) if it still causes problems, this would be around 50% slower based on local benchmarking + } + @Test def runBootstrappedOnly: Unit = { implicit val testGroup: TestGroup = TestGroup("runBootstrappedOnly") aggregateTests( diff --git a/tests/run-with-compiler/scala2-library-from-tasty-jar.scala b/tests/run-custom-args/scala2-library-from-tasty-jar.scala similarity index 100% rename from tests/run-with-compiler/scala2-library-from-tasty-jar.scala rename to tests/run-custom-args/scala2-library-from-tasty-jar.scala diff --git a/tests/run-with-compiler/scala2-library-from-tasty.scala b/tests/run-custom-args/scala2-library-from-tasty.scala similarity index 100% rename from tests/run-with-compiler/scala2-library-from-tasty.scala rename to tests/run-custom-args/scala2-library-from-tasty.scala