mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-07-04 21:12:53 -05:00
gtr: Also look at failures in benchmarks when creating a package
When we encounter a failure but there was not failing test, we create a failing dummy test in the report. This is to prevent the failure from being overlooked. The case where the output contained a failing benchmark was not handled correctly, resulting in a dummy test failure being added to the report unnecessarily.
This commit is contained in:
10
testdata/036-report.xml
vendored
10
testdata/036-report.xml
vendored
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites tests="4" errors="1" failures="2" skipped="1">
|
||||
<testsuite name="package/name/benchfail" tests="4" failures="2" errors="1" id="0" hostname="hostname" skipped="1" time="0.002" timestamp="2022-01-01T00:00:00Z">
|
||||
<testsuites tests="3" failures="2" skipped="1">
|
||||
<testsuite name="package/name/benchfail" tests="3" failures="2" errors="0" id="0" hostname="hostname" skipped="1" time="0.002" timestamp="2022-01-01T00:00:00Z">
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
@ -13,11 +13,9 @@
|
||||
<testcase name="BenchmarkSkip" classname="package/name/benchfail" time="0.000">
|
||||
<skipped message="Skipped"><![CDATA[ bench_test.go:14: skip message]]></skipped>
|
||||
</testcase>
|
||||
<testcase name="Failure" classname="package/name/benchfail" time="0.000">
|
||||
<error message="Runtime error"><![CDATA[goos: linux
|
||||
<system-out><![CDATA[goos: linux
|
||||
goarch: amd64
|
||||
pkg: package/name/benchfail
|
||||
exit status 1]]></error>
|
||||
</testcase>
|
||||
exit status 1]]></system-out>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
10
testdata/110-report.xml
vendored
10
testdata/110-report.xml
vendored
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites tests="4" errors="1" failures="2" skipped="1">
|
||||
<testsuite name="package/name/benchfail" tests="4" failures="2" errors="1" id="0" hostname="hostname" skipped="1" time="0.002" timestamp="2022-01-01T00:00:00Z">
|
||||
<testsuites tests="3" failures="2" skipped="1">
|
||||
<testsuite name="package/name/benchfail" tests="3" failures="2" errors="0" id="0" hostname="hostname" skipped="1" time="0.002" timestamp="2022-01-01T00:00:00Z">
|
||||
<properties>
|
||||
<property name="go.version" value="1.0"></property>
|
||||
</properties>
|
||||
@ -13,11 +13,9 @@
|
||||
<testcase name="BenchmarkSkip" classname="package/name/benchfail" time="0.000">
|
||||
<skipped message="Skipped"><![CDATA[ bench_test.go:14: skip message]]></skipped>
|
||||
</testcase>
|
||||
<testcase name="Failure" classname="package/name/benchfail" time="0.000">
|
||||
<error message="Runtime error"><![CDATA[goos: linux
|
||||
<system-out><![CDATA[goos: linux
|
||||
goarch: amd64
|
||||
pkg: package/name/benchfail
|
||||
exit status 1]]></error>
|
||||
</testcase>
|
||||
exit status 1]]></system-out>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
Reference in New Issue
Block a user