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:
Martin Hořeňovský 2020-05-15 21:00:19 +02:00
parent f764ee3d30
commit f133277910
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
2 changed files with 566 additions and 561 deletions

View File

@ -193,6 +193,11 @@ namespace Catch {
xml.writeAttribute( "name", name );
}
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 );

File diff suppressed because it is too large Load Diff