mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-07-06 22:12:51 -05:00
Parse package name output when test binary name is included
Sometimes, the text after "# " shows the name of the test binary ("<package>.test") in addition to the package e.g.: "# package/name [package/name.test]". This change ensures that the packages' build outputs are associated correctly in this case.
This commit is contained in:
20
testdata/31-syntax-error-test-binary.txt
vendored
Normal file
20
testdata/31-syntax-error-test-binary.txt
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
# package/name/failing1 [package/name/failing1.test]
|
||||
failing1/failing_test.go:15: undefined: x
|
||||
# package/name/failing2 [package/name/failing2.test]
|
||||
failing2/another_failing_test.go:20: undefined: y
|
||||
# package/name/setupfailing1 [package/name/setupfailing1.test]
|
||||
setupfailing1/failing_test.go:4: cannot find package "other/package" in any of:
|
||||
/path/vendor (vendor tree)
|
||||
/path/go/root (from $GOROOT)
|
||||
/path/go/path (from $GOPATH)
|
||||
=== RUN TestA
|
||||
--- PASS: TestA (0.10 seconds)
|
||||
PASS
|
||||
ok package/name/passing1 0.100s
|
||||
=== RUN TestB
|
||||
--- PASS: TestB (0.10 seconds)
|
||||
PASS
|
||||
ok package/name/passing2 0.100s
|
||||
FAIL package/name/failing1 [build failed]
|
||||
FAIL package/name/failing2 [build failed]
|
||||
FAIL package/name/setupfailing1 [setup failed]
|
Reference in New Issue
Block a user