mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-06-30 19:42:46 -05:00
compiled test's output have no result line, fill "package name" with flag -package-name , and fill "time" with sum of individual tests' time.
This commit is contained in:
@ -7,16 +7,18 @@ import (
|
||||
)
|
||||
|
||||
var noXmlHeader bool
|
||||
var packageName string
|
||||
|
||||
func init() {
|
||||
flag.BoolVar(&noXmlHeader, "no-xml-header", false, "do not print xml header")
|
||||
flag.StringVar(&packageName, "package-name", "", "specify a package name (compiled test have no package name in output)")
|
||||
}
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
// Read input
|
||||
report, err := Parse(os.Stdin)
|
||||
report, err := Parse(os.Stdin, packageName)
|
||||
if err != nil {
|
||||
fmt.Printf("Error reading input: %s\n", err)
|
||||
os.Exit(1)
|
||||
|
Reference in New Issue
Block a user