Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Mar 6, 2025
1 parent 110d3a8 commit 50e3970
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions testrunner/src/mill/testrunner/TestRunnerUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ import scala.jdk.CollectionConverters.IteratorHasAsScala
testReporter: TestReporter,
runner: Runner
): (String, Iterator[TestResult]) = {
// Capture this value outside of the task event handler so it
// isn't affected by a test framework's stream redirects
val systemOut = System.out
val events = new ConcurrentLinkedQueue[Event]()
val doneMessage = {

Expand All @@ -148,12 +151,12 @@ import scala.jdk.CollectionConverters.IteratorHasAsScala
}
},
Array(new Logger {
def debug(msg: String) = println(msg)
def error(msg: String) = println(msg)
def debug(msg: String) = systemOut.println(msg)
def error(msg: String) = systemOut.println(msg)
def ansiCodesSupported() = true
def warn(msg: String) = println(msg)
def trace(t: Throwable) = t.printStackTrace(System.out)
def info(msg: String) = println(msg)
def warn(msg: String) = systemOut.println(msg)
def trace(t: Throwable) = t.printStackTrace(systemOut)
def info(msg: String) = systemOut.println(msg)
})
)

Expand Down

0 comments on commit 50e3970

Please sign in to comment.