From 7556fd53d30c22afeee3793694072381ed5a16b9 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Fri, 25 Jun 2021 14:39:56 +0200 Subject: [PATCH] Disable some flaky scalatest's tests We usually don't notice these failures because the community build retries a project up to three times in case of failure, but sometimes all three of them fail, and even when it succeeds it means that community_build_a sometimes takes much longer than it needs to (2 hours instead of 1 hour). I'v reported this upstream at https://github.com/scalatest/scalatest/issues/2049. --- .../src/scala/dotty/communitybuild/projects.scala | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/community-build/src/scala/dotty/communitybuild/projects.scala b/community-build/src/scala/dotty/communitybuild/projects.scala index 49100b2b4ed0..6128796bbff7 100644 --- a/community-build/src/scala/dotty/communitybuild/projects.scala +++ b/community-build/src/scala/dotty/communitybuild/projects.scala @@ -278,7 +278,19 @@ object projects: lazy val scalatest: SbtCommunityProject = SbtCommunityProject( project = "scalatest", - sbtTestCommand = "scalacticDotty/clean; scalacticDottyJS/clean; scalacticTestDotty/test; scalatestTestDotty/test; scalacticDottyJS/compile; scalatestDottyJS/compile", + sbtTestCommand = + List( + "scalacticDotty/clean; scalacticDottyJS/clean", + + // Some scalatest's tests are flaky (https://github.com/scalatest/scalatest/issues/2049) + // so we disable them, this list is based on the one used in the Scala 2 community build + // (https://github.com/scala/community-build/blob/2.13.x/proj/scalatest.conf). + """set scalatestTest / Test / unmanagedSources / excludeFilter := HiddenFileFilter || "GeneratorSpec.scala" || "FrameworkSuite.scala" || "WaitersSpec.scala" || "TestSortingReporterSpec.scala" || "JavaFuturesSpec.scala" || "ParallelTestExecutionSpec.scala" || "TimeLimitsSpec.scala" || "TestThreadsStartingCounterSpec.scala" || "SuiteSortingReporterSpec.scala" || "CommonGeneratorsSpec.scala" || "PropCheckerAssertingSpec.scala" || "ConductorMethodsSuite.scala"""", + """set scalacticTest / Test / unmanagedSources / excludeFilter := HiddenFileFilter || "NonEmptyArraySpec.scala"""", + """set genRegularTests4 / Test / managedSources ~= (_.filterNot(_.getName == "FrameworkSuite.scala").filterNot(_.getName == "GeneratorSpec.scala").filterNot(_.getName == "CommonGeneratorsSpec.scala").filterNot(_.getName == "ParallelTestExecutionSpec.scala").filterNot(_.getName == "DispatchReporterSpec.scala").filterNot(_.getName == "TestThreadsStartingCounterSpec.scala").filterNot(_.getName == "EventuallySpec.scala"))""", + + "scalacticTestDotty/test; scalatestTestDotty/test; scalacticDottyJS/compile; scalatestDottyJS/compile" + ).mkString("; "), sbtPublishCommand = "scalacticDotty/publishLocal; scalatestDotty/publishLocal; scalacticDottyJS/publishLocal; scalatestDottyJS/publishLocal", sbtDocCommand = ";scalacticDotty/doc", // fails with missing type ;scalatestDotty/doc" // cannot take signature of (test: org.scalatest.concurrent.ConductorFixture#OneArgTest):