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

verify.runner.Runner.scala Maven / Gradle / Ivy

The newest version!
/*
 * Scala (https://www.scala-lang.org)
 *
 * Copyright EPFL and Lightbend, Inc.
 *
 * Licensed under Apache License 2.0
 * (http://www.apache.org/licenses/LICENSE-2.0).
 *
 * See the NOTICE file distributed with this work for
 * additional information regarding copyright ownership.
 */

package verify.runner

import sbt.testing.{ Runner => BaseRunner, Task => BaseTask, _ }
import scala.concurrent.ExecutionContext

final class Runner(
    val args: Array[String],
    remoteArgs0: Array[String],
    val options: Options,
    val ec: ExecutionContext,
    classLoader: ClassLoader
) extends BaseRunner {

  override def remoteArgs(): Array[String] = remoteArgs0

  def done(): String = ""

  def tasks(list: Array[TaskDef]): Array[BaseTask] = {
    list.map(t => new Task(t, options, classLoader, ec))
  }

  def receiveMessage(msg: String): Option[String] = {
    None
  }

  def serializeTask(task: BaseTask, serializer: TaskDef => String): String =
    serializer(task.taskDef())

  def deserializeTask(task: String, deserializer: String => TaskDef): BaseTask =
    new Task(deserializer(task), options, classLoader, ec)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy