mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 11:43:29 +01:00
Add status attribute to JUnit's section reporting
This brings our output inline with GTest's. We do not handle skipped tests properly, but that should be currently less important than having the attribute exist with proper value for non-skipped tests. Thanks @joda-01. Closes #1899
This commit is contained in:
parent
f764ee3d30
commit
f133277910
@ -193,6 +193,11 @@ namespace Catch {
|
|||||||
xml.writeAttribute( "name", name );
|
xml.writeAttribute( "name", name );
|
||||||
}
|
}
|
||||||
xml.writeAttribute( "time", ::Catch::Detail::stringify( sectionNode.stats.durationInSeconds ) );
|
xml.writeAttribute( "time", ::Catch::Detail::stringify( sectionNode.stats.durationInSeconds ) );
|
||||||
|
// This is not ideal, but it should be enough to mimic gtest's
|
||||||
|
// junit output.
|
||||||
|
// Ideally the JUnit reporter would also handle `skipTest`
|
||||||
|
// events and write those out appropriately.
|
||||||
|
xml.writeAttribute( "status", "run" );
|
||||||
|
|
||||||
writeAssertions( sectionNode );
|
writeAssertions( sectionNode );
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user