mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-07-18 19:41:00 -05:00
Use test level failure to indicate build failure
- Use single regex for package result line - Add capturing of package build failure output
This commit is contained in:
@ -1,8 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites>
|
||||
<testsuite tests="0" failures="0" time="0.000" name="package/name">
|
||||
<testsuite tests="1" failures="0" time="0.100" name="package/name/passing1">
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase classname="passing1" name="TestA" time="0.100"></testcase>
|
||||
</testsuite>
|
||||
<testsuite tests="1" failures="0" time="0.100" name="package/name/passing2">
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase classname="passing2" name="TestB" time="0.100"></testcase>
|
||||
</testsuite>
|
||||
<testsuite tests="1" failures="1" time="0.000" name="package/name/failing1">
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase classname="failing1" name="build failed" time="0.000">
|
||||
<failure message="Failed" type="">failing1/failing_test.go:15: undefined: x</failure>
|
||||
</testcase>
|
||||
</testsuite>
|
||||
<testsuite tests="1" failures="1" time="0.000" name="package/name/failing2">
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
<testcase classname="failing2" name="build failed" time="0.000">
|
||||
<failure message="Failed" type="">failing2/another_failing_test.go:20: undefined: y</failure>
|
||||
</testcase>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
@ -1,2 +1,14 @@
|
||||
package/name/file_test.go:9: undefined: x
|
||||
FAIL package/name [build failed]
|
||||
# package/name/failing1
|
||||
failing1/failing_test.go:15: undefined: x
|
||||
# package/name/failing2
|
||||
failing2/another_failing_test.go:20: undefined: y
|
||||
=== 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]
|
||||
|
Reference in New Issue
Block a user