parser/gotest: Don't ignore output when there were no tests

In some cases we may have captured some output for a package that didn't
have any tests. We should include it in the generated report as it may
contain useful information.
This commit is contained in:
Joël Stemmer
2022-06-25 00:01:03 +01:00
parent d84b41a3f9
commit 8648745762
4 changed files with 5 additions and 0 deletions

View File

@ -210,6 +210,8 @@ func (b *reportBuilder) CreatePackage(name, result string, duration time.Duratio
Name: name,
Output: b.output.Get(globalID),
}
} else if b.output.Contains(globalID) {
pkg.Output = b.output.Get(globalID)
}
b.packages = append(b.packages, pkg)
b.output.Clear(globalID)