Test throwing in Test#execute too

This commit is contained in:
Dale Wijnand 2016-09-02 15:39:09 +01:00
parent 6a26bb2fb6
commit c6527b0665
2 changed files with 9 additions and 1 deletions

View File

@ -11,7 +11,14 @@ class MyFramework extends sbt.testing.Framework {
class MyRunner(val args: Array[String], val remoteArgs: Array[String],
val testClassLoader: ClassLoader) extends sbt.testing.Runner {
def tasks(taskDefs: Array[TaskDef]): Array[Task] = throw new Throwable()
def tasks(taskDefs: Array[TaskDef]): Array[Task] =
if (args contains "task-boom") taskDefs map BoomTask else throw new Throwable()
def done(): String = ""
private case class BoomTask(taskDef: TaskDef) extends Task {
def tags = Array.empty[String]
def execute(handler: EventHandler, loggers: Array[Logger]) = throw new Throwable()
}
}

View File

@ -1 +1,2 @@
-> test
-> testOnly -- task-boom