From cdfc72d05d5bdf3c7cb37b2e74237c0bd94ec943 Mon Sep 17 00:00:00 2001 From: Eugene Vigdorchik Date: Tue, 3 Apr 2012 18:35:07 +0400 Subject: [PATCH] Given the ease of defining concurrentRestictions, I think it should be left to the user to correctly provide the limit for forked test groups. --- main/Defaults.scala | 5 ++--- main/Keys.scala | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/main/Defaults.scala b/main/Defaults.scala index f03465865..a14f91ef3 100755 --- a/main/Defaults.scala +++ b/main/Defaults.scala @@ -57,7 +57,6 @@ object Defaults extends BuildCommon onComplete <<= taskTemporaryDirectory { dir => () => IO.delete(dir); IO.createDirectory(dir) }, concurrentRestrictions <<= concurrentRestrictions or defaultRestrictions, parallelExecution :== true, - parallelTestGroups := 1, sbtVersion <<= appConfiguration { _.provider.id.version }, sbtBinaryVersion <<= sbtVersion apply binarySbtVersion, sbtResolver <<= sbtVersion { sbtV => if(sbtV endsWith "-SNAPSHOT") Classpaths.typesafeSnapshots else Classpaths.typesafeReleases }, @@ -399,9 +398,9 @@ object Defaults extends BuildCommon def detectTests: Initialize[Task[Seq[TestDefinition]]] = (loadedTestFrameworks, compile, streams) map { (frameworkMap, analysis, s) => Tests.discover(frameworkMap.values.toSeq, analysis, s.log)._1 } - def defaultRestrictions: Initialize[Seq[Tags.Rule]] = (parallelExecution, parallelTestGroups) { (par, ptg) => + def defaultRestrictions: Initialize[Seq[Tags.Rule]] = parallelExecution { par => val max = EvaluateTask.SystemProcessors - Tags.limitAll(if(par) max else 1) :: Tags.limit(Tags.ForkedTestGroup, ptg) :: Nil + Tags.limitAll(if(par) max else 1) :: Tags.limit(Tags.ForkedTestGroup, 1) :: Nil } lazy val packageBase: Seq[Setting[_]] = Seq( diff --git a/main/Keys.scala b/main/Keys.scala index 4aab237c4..f332a7a6c 100644 --- a/main/Keys.scala +++ b/main/Keys.scala @@ -199,7 +199,6 @@ object Keys val testExecution = TaskKey[Tests.Execution]("test-execution", "Settings controlling test execution") val testFilter = TaskKey[Seq[String] => String => Boolean]("test-filter", "Filter controlling whether the test is executed") val testGrouping = TaskKey[Seq[Tests.Group]]("test-grouping", "Groups discovered tests into groups.") - val parallelTestGroups = SettingKey[Int]("parallel-test-groups", "Maximum number of test groups that may run at the same time.") val isModule = AttributeKey[Boolean]("is-module", "True if the target is a module.") // Classpath/Dependency Management Keys