diff --git a/project/Build.scala b/project/Build.scala index f390f32533a3..6c6666b9f62b 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -276,6 +276,18 @@ object Build { val config = develocityConfiguration.value val buildScan = config.buildScan val buildCache = config.buildCache + // disable test retry on compilation test classes + val noRetryTestClasses = Set( + "dotty.tools.dotc.BestEffortOptionsTests", + "dotty.tools.dotc.CompilationTests", + "dotty.tools.dotc.FromTastyTests", + "dotty.tools.dotc.IdempotencyTests", + "dotty.tools.dotc.ScalaJSCompilationTests", + "dotty.tools.dotc.TastyBootstrapTests", + "dotty.tools.dotc.coverage.CoverageTests", + "dotty.tools.dotc.transform.PatmatExhaustivityTest", + "dotty.tools.repl.ScriptedTests" + ) config .withProjectId(ProjectId("scala3")) .withServer(config.server.withUrl(Some(url("https://develocity.scala-lang.org")))) @@ -293,6 +305,13 @@ object Build { .withLocal(buildCache.local.withEnabled(false)) .withRemote(buildCache.remote.withEnabled(false)) ) + .withTestRetryConfiguration( + config.testRetryConfiguration + .withFlakyTestPolicy(FlakyTestPolicy.Fail) + .withMaxRetries(1) + .withMaxFailures(10) + .withClassesFilter((className, _) => !noRetryTestClasses.contains(className)) + ) } )