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

mill.testkit.UtestExampleTestSuite.scala Maven / Gradle / Ivy

There is a newer version: 0.12.0-RC2-17-07e173
Show newest version
package mill.testkit
import mill.api.Retry
import utest._

import scala.concurrent.duration.DurationInt

object UtestExampleTestSuite extends TestSuite {
  val workspaceSourcePath: os.Path = os.Path(sys.env("MILL_TEST_RESOURCE_FOLDER"))
  val clientServerMode: Boolean = sys.env("MILL_INTEGRATION_SERVER_MODE").toBoolean

  val millExecutable: os.Path = os.Path(System.getenv("MILL_INTEGRATION_LAUNCHER"), os.pwd)
  val tests: Tests = Tests {

    test("exampleTest") {
      if (sys.env.contains("CI")) {
        Retry(count = 3, timeoutMillis = 5.minutes.toMillis) {
          ExampleTester.run(
            clientServerMode,
            workspaceSourcePath,
            millExecutable
          )
        }
      } else {
        ExampleTester.run(
          clientServerMode,
          workspaceSourcePath,
          millExecutable
        )
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy