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 8b5f6e26d3
commit f3fe2dcb11
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
2 changed files with 621 additions and 616 deletions

View File

@ -198,6 +198,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