mirror of https://github.com/sbt/sbt.git
Given the ease of defining concurrentRestictions, I think it should be left to the user to correctly provide the limit for forked test groups.
This commit is contained in:
parent
e169e4f222
commit
cdfc72d05d
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue