mirror of https://github.com/sbt/sbt.git
Only print extra test status counts if nonzero
This commit is contained in:
parent
301c11f9e0
commit
53191cb787
|
|
@ -236,8 +236,12 @@ object Tests
|
||||||
ignoredAcc + testEvent.ignoredCount, canceledAcc + testEvent.canceledCount, pendingAcc + testEvent.pendingCount)
|
ignoredAcc + testEvent.ignoredCount, canceledAcc + testEvent.canceledCount, pendingAcc + testEvent.pendingCount)
|
||||||
}
|
}
|
||||||
val totalCount = failuresCount + errorsCount + skippedCount + passedCount
|
val totalCount = failuresCount + errorsCount + skippedCount + passedCount
|
||||||
val postfix = "Total " + totalCount + ", Failed " + failuresCount + ", Errors " + errorsCount + ", Passed " + passedCount + ", Skipped " + skippedCount +
|
val base = s"Total $totalCount, Failed $failuresCount, Errors $errorsCount, Passed $passedCount"
|
||||||
", Ignored " + ignoredCount + ", Canceled " + canceledCount + ", Pending " + pendingCount
|
|
||||||
|
val otherCounts = Seq("Skipped" -> skippedCount, "Ignored" -> ignoredCount, "Canceled" -> canceledCount, "Pending" -> pendingCount)
|
||||||
|
val extra = otherCounts.filter(_._2 > 0).map{case(label,count) => s", $label $count" }
|
||||||
|
|
||||||
|
val postfix = base + extra.mkString
|
||||||
results.overall match {
|
results.overall match {
|
||||||
case TestResult.Error => log.error("Error: " + postfix)
|
case TestResult.Error => log.error("Error: " + postfix)
|
||||||
case TestResult.Passed => log.info("Passed: " + postfix)
|
case TestResult.Passed => log.info("Passed: " + postfix)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue