Skip to content

Commit

Permalink
Prepare the code to support properties propagation on junit report
Browse files Browse the repository at this point in the history
  • Loading branch information
romain-gilles-ultra committed May 13, 2024
1 parent 9e7b2dc commit 458e92c
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions scalalib/src/mill/scalalib/TestModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,7 @@ trait TestModule
val (doneMsg, results) = {
upickle.default.read[(String, Seq[TestResult])](jsonOutput)
}
TestModule.handleResults(
doneMsg,
results,
T.ctx(),
testReportXml(),
sys.props.toMap ++ forkEnv()
)
TestModule.handleResults(doneMsg, results, T.ctx(), testReportXml())
} catch {
case e: Throwable =>
Result.Failure("Test reporting failed: " + e)
Expand Down Expand Up @@ -338,9 +332,11 @@ object TestModule {
results: Seq[TestResult],
ctx: Ctx.Env with Ctx.Dest,
testReportXml: Option[String],
props: Map[String, String] = Map.empty
props: Option[Map[String, String]] = None
): Result[(String, Seq[TestResult])] = {
testReportXml.foreach(fileName => genTestXmlReport(results, ctx.dest / fileName, props))
testReportXml.foreach(fileName =>
genTestXmlReport(results, ctx.dest / fileName, props.getOrElse(Map.empty))
)
handleResults(doneMsg, results, Some(ctx))
}

Expand Down

0 comments on commit 458e92c

Please sign in to comment.