All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cgta.otest.runner.OtestRunner.scala Maven / Gradle / Ivy

The newest version!
package cgta.otest
package runner

import sbt.testing.{TaskDef, Task}


//////////////////////////////////////////////////////////////
// Copyright (c) 2014 Ben Jackman, Jeff Gomberg
// All Rights Reserved
// please contact [email protected] or [email protected]
// for licensing inquiries
// Created by bjackman @ 5/28/14 4:37 PM
//////////////////////////////////////////////////////////////

class OtestRunner(
  override val args: Array[String],
  override val remoteArgs: Array[String],
  val testClassLoader: ClassLoader) extends sbt.testing.Runner {

  val tracker = new TestResultTracker

  override def done(): String = {
    tracker.doneString
  }

  override def tasks(taskDefs: Array[TaskDef]): Array[Task] = {
    taskDefs.map { taskDef => new OtestTask(taskDef, tracker, testClassLoader): Task}
  }

  def receiveMessage(msg: String): Option[String] = {
    None
  }
  def serializeTask(task: sbt.testing.Task, serializer: sbt.testing.TaskDef => String): String = {
    serializer(task.taskDef())
  }
  def deserializeTask(task: String, deserializer: String => sbt.testing.TaskDef): sbt.testing.Task = {
    new OtestTask(deserializer(task), tracker, testClassLoader)
  }


}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy