gtr: Write test output to JUnit SystemOut

Fixes #108
This commit is contained in:
Joël Stemmer
2022-02-27 23:27:22 +00:00
parent 76f68922a2
commit bab26d76b5
11 changed files with 21 additions and 0 deletions

View File

@ -115,6 +115,10 @@ func JUnit(report Report, hostname string, now time.Time) junit.Testsuites {
Hostname: hostname,
}
if len(pkg.Output) > 0 {
suite.SystemOut = &junit.Output{Data: formatOutput(pkg.Output, 0)}
}
if pkg.Coverage > 0 {
suite.AddProperty("coverage.statements.pct", fmt.Sprintf("%.2f", pkg.Coverage))
}