Skip to content

Commit

Permalink
TEMP: skip integration.feature[plugin-classpath].local.test
Browse files Browse the repository at this point in the history
  • Loading branch information
bishabosha committed Sep 17, 2024
1 parent 714f3e2 commit 78beea1
Showing 1 changed file with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,38 @@ package mill.integration
import mill.testkit.UtestIntegrationTestSuite

import utest._
import scala.concurrent.Future
import scala.concurrent.ExecutionContext
import java.util.concurrent.atomic.AtomicReference

object MillPluginClasspathTest extends UtestIntegrationTestSuite {
/** Trait that temporarily ignores tests
* @note I'd propose to make "skipping" a part core utest library, so that the summary includes the skipped tests
*/
trait UTestIgnore(name: String) extends utest.TestSuite {
val skipList = AtomicReference(List.empty[String])

private def yellow(str: String) = Console.YELLOW + str + Console.RESET

override def utestWrap(path: Seq[String], runBody: => Future[Any])(implicit ec: ExecutionContext): Future[Any] = {
Future({
skipList.updateAndGet(s"$name.${path.mkString(".")}" :: _)
()
})
}

override def utestAfterAll(): Unit = {
val skipped = skipList.getAndUpdate(_ => Nil)
if (skipped.nonEmpty) {
println(yellow(s"Skipped tests in $name:"))
skipped.foreach { s =>
println(yellow(s" - $s"))
}
}
}
}

object MillPluginClasspathTest extends UtestIntegrationTestSuite
with UTestIgnore("mill.integration.MillPluginClasspathTest") {

val embeddedModules: Seq[(String, String)] = Seq(
("com.lihaoyi", "mill-main-client"),
Expand Down

0 comments on commit 78beea1

Please sign in to comment.