@@ -3,8 +3,38 @@ package mill.integration
33import  mill .testkit .UtestIntegrationTestSuite 
44
55import  utest ._ 
6+ import  scala .concurrent .Future 
7+ import  scala .concurrent .ExecutionContext 
8+ import  java .util .concurrent .atomic .AtomicReference 
69
7- object  MillPluginClasspathTest  extends  UtestIntegrationTestSuite  {
10+ /**  Trait that temporarily ignores tests
11+  * @note  I'd propose to make "skipping" a part core utest library, so that the summary includes the skipped tests 
12+  */  
13+ trait  UTestIgnore (name : String ) extends  utest.TestSuite  {
14+   val  skipList  =  AtomicReference (List .empty[String ])
15+ 
16+   private  def  yellow (str : String ) =  Console .YELLOW  +  str +  Console .RESET 
17+ 
18+   override  def  utestWrap (path : Seq [String ], runBody : =>  Future [Any ])(implicit  ec : ExecutionContext ):  Future [Any ] =  {
19+     Future ({
20+       skipList.updateAndGet(s " $name. ${path.mkString(" ." "  ::  _)
21+       ()
22+     })
23+   }
24+ 
25+   override  def  utestAfterAll ():  Unit  =  {
26+     val  skipped  =  skipList.getAndUpdate(_ =>  Nil )
27+     if  (skipped.nonEmpty) {
28+       println(yellow(s " Skipped tests in  $name: " ))
29+       skipped.foreach { s => 
30+         println(yellow(s "   -  $s" ))
31+       }
32+     }
33+   }
34+ }
35+ 
36+ object  MillPluginClasspathTest  extends  UtestIntegrationTestSuite 
37+   with  UTestIgnore (" mill.integration.MillPluginClasspathTest" 
838
939  val  embeddedModules :  Seq [(String , String )] =  Seq (
1040    (" com.lihaoyi" " mill-main-client" 
0 commit comments