mirror of https://github.com/sbt/sbt.git
More indentation messed up.
This commit is contained in:
parent
b5766e4057
commit
2ba9bbc767
|
|
@ -288,7 +288,7 @@ object Defaults extends BuildCommon
|
|||
testFilter in testQuick <<= testQuickFilter,
|
||||
executeTests <<= (streams in test, loadedTestFrameworks, testLoader, testGrouping in test, fullClasspath in test, javaOptions in test, javaHome in test) flatMap {
|
||||
(s, frameworkMap, loader, groups, cp, javaOpts, javaHome) =>
|
||||
val tasks = groups map {
|
||||
val tasks = groups map {
|
||||
case Tests.Group(name, tests, config) =>
|
||||
config.subproc match {
|
||||
case Tests.Fork(extraJvm) =>
|
||||
|
|
@ -297,7 +297,7 @@ object Defaults extends BuildCommon
|
|||
Tests(frameworkMap, loader, tests, config, s.log)
|
||||
}
|
||||
}
|
||||
Tests.foldTasks(tasks)
|
||||
Tests.foldTasks(tasks)
|
||||
},
|
||||
test <<= (executeTests, streams, resolvedScoped, state) map {
|
||||
(results, s, scoped, st) =>
|
||||
|
|
@ -378,7 +378,7 @@ object Defaults extends BuildCommon
|
|||
val tasks = groups map {
|
||||
case Tests.Group(name, tests, config) =>
|
||||
val modifiedOpts = Tests.Filter(filter(selected)) +: Tests.Argument(frameworkOptions : _*) +: config.options
|
||||
val newConfig = config.copy(options = modifiedOpts)
|
||||
val newConfig = config.copy(options = modifiedOpts)
|
||||
newConfig.subproc match {
|
||||
case Tests.Fork(extraJvm) =>
|
||||
ForkTests(frameworks.keys.toSeq, tests.toList, newConfig, cp.files, javaHome, javaOpts, s.log) tag Tags.ForkedTestGroup
|
||||
|
|
@ -527,12 +527,11 @@ object Defaults extends BuildCommon
|
|||
def runnerTask = runner <<= runnerInit
|
||||
def runnerInit: Initialize[Task[ScalaRun]] =
|
||||
(taskTemporaryDirectory, scalaInstance, baseDirectory, javaOptions, outputStrategy, fork, javaHome, trapExit, connectInput) map {
|
||||
(tmp, si, base, options, strategy, forkRun, javaHomeDir, trap, connectIn) =>
|
||||
(tmp, si, base, options, strategy, forkRun, javaHomeDir, trap, connectIn) =>
|
||||
if(forkRun) {
|
||||
new ForkRun( ForkOptions(scalaJars = si.jars, javaHome = javaHomeDir, connectInput = connectIn, outputStrategy = strategy,
|
||||
runJVMOptions = options, workingDirectory = Some(base)) )
|
||||
} else
|
||||
new Run(si, trap, tmp)
|
||||
new ForkRun( ForkOptions(scalaJars = si.jars, javaHome = javaHomeDir, connectInput = connectIn, outputStrategy = strategy, runJVMOptions = options, workingDirectory = Some(base)) )
|
||||
} else
|
||||
new Run(si, trap, tmp)
|
||||
}
|
||||
|
||||
@deprecated("Use `docTaskSettings` instead", "0.12.0")
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ private[sbt] object ForkTests {
|
|||
val is = new ObjectInputStream(socket.getInputStream)
|
||||
|
||||
import Tags._
|
||||
@annotation.tailrec def react: Unit = is.readObject match {
|
||||
@annotation.tailrec def react: Unit = is.readObject match {
|
||||
case `Done` => os.writeObject(Done);
|
||||
case Array(`Error`, s: String) => log.error(s); react
|
||||
case Array(`Warn`, s: String) => log.warn(s); react
|
||||
|
|
@ -52,14 +52,14 @@ private[sbt] object ForkTests {
|
|||
case t: Throwable => log.trace(t); react
|
||||
case tEvents: Array[Event] =>
|
||||
for (first <- tEvents.headOption) listeners.foreach(_ startGroup first.testName)
|
||||
val event = TestEvent(tEvents)
|
||||
listeners.foreach(_ testEvent event)
|
||||
for (first <- tEvents.headOption) {
|
||||
val result = event.result getOrElse TestResult.Passed
|
||||
results += first.testName -> result
|
||||
listeners.foreach(_ endGroup (first.testName, result))
|
||||
}
|
||||
react
|
||||
val event = TestEvent(tEvents)
|
||||
listeners.foreach(_ testEvent event)
|
||||
for (first <- tEvents.headOption) {
|
||||
val result = event.result getOrElse TestResult.Passed
|
||||
results += first.testName -> result
|
||||
listeners.foreach(_ endGroup (first.testName, result))
|
||||
}
|
||||
react
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
@ -80,8 +80,8 @@ private[sbt] object ForkTests {
|
|||
} finally {
|
||||
is.close(); os.close(); socket.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
testListeners.foreach(_.doInit())
|
||||
|
|
|
|||
|
|
@ -128,8 +128,8 @@ object Tests
|
|||
(overall(results.map(_._2)), results.toMap)
|
||||
def foldTasks(results: Seq[Task[Output]]): Task[Output] =
|
||||
reduced(results.toIndexedSeq, {
|
||||
case ((v1, m1), (v2, m2)) => (if (v1.id < v2.id) v2 else v1, m1 ++ m2)
|
||||
})
|
||||
case ((v1, m1), (v2, m2)) => (if (v1.id < v2.id) v2 else v1, m1 ++ m2)
|
||||
})
|
||||
def overall(results: Iterable[TestResult.Value]): TestResult.Value =
|
||||
(TestResult.Passed /: results) { (acc, result) => if(acc.id < result.id) result else acc }
|
||||
def discover(frameworks: Seq[Framework], analysis: Analysis, log: Logger): (Seq[TestDefinition], Set[String]) =
|
||||
|
|
|
|||
Loading…
Reference in New Issue