reporting: use final result instead traversing over all reports.json (including total report called reports.json too)
This commit is contained in:
committed by
vvlevchenko
parent
ea75220792
commit
1eebae5c4e
@@ -26,18 +26,12 @@ class Reporter extends DefaultTask {
|
|||||||
@TaskAction
|
@TaskAction
|
||||||
public void report() {
|
public void report() {
|
||||||
def stats = new RunExternalTestGroup.Statistics()
|
def stats = new RunExternalTestGroup.Statistics()
|
||||||
reportHome.traverse {
|
def obj = new JsonSlurper().parse(new File(reportHome, "results.json"))
|
||||||
println("$it $it.name")
|
stats.total = obj.statistics.total
|
||||||
if (it.name == 'results.json') {
|
stats.passed = obj.statistics.passed
|
||||||
def obj = new JsonSlurper().parse(it)
|
stats.failed = obj.statistics.failed
|
||||||
stats.total += obj.statistics.total
|
stats.error = obj.statistics.error
|
||||||
stats.passed += obj.statistics.passed
|
stats.skipped = obj.statistics.skipped
|
||||||
stats.failed += obj.statistics.failed
|
|
||||||
stats.error += obj.statistics.error
|
|
||||||
stats.skipped += obj.statistics.skipped
|
|
||||||
}
|
|
||||||
FileVisitResult.CONTINUE
|
|
||||||
}
|
|
||||||
|
|
||||||
def epilog = ""
|
def epilog = ""
|
||||||
def teamcityConfig = System.getenv("TEAMCITY_BUILD_PROPERTIES_FILE")
|
def teamcityConfig = System.getenv("TEAMCITY_BUILD_PROPERTIES_FILE")
|
||||||
|
|||||||
Reference in New Issue
Block a user