This option is designed to save on disk space in cases where a CI system
is running dozens of builds each day and is using the information in the
XUnit report to display information about the tests. Due to the sheer
number of tests in the LLVM repo each XUnit report is multiple MB in
size and when multiplied by large numbers of builds these reports can
consume swathes of disk space when each report is archived by CI unless
an aggressive expiration strategy is in place, meaning that historical
data about failures is lost.
In general, the most interesting results are those were a test has
failed (UNRESOLVED/TIMEOUT/FAIL/XPASS) so this new option limits the
report to only include these tests. This comes at the expense of
continuity of test data (a new failure will show as a new test for
example, and no duration data will be recorded for passing tests), but
for some users this may be a trade-off worth making.
I'm not sure whether this would be considered controversial or not as it somewhat breaks the xunit format (although only when the new flag is enabled), so if we ultimately decide not to go with this it's okay. We would definitely find it useful internally though. I've tested it with Jenkins' xunit reporting and it works as I'd expect. I can see all the failures in any given build - just not the passes, and therefore the history isn't as useful. It's an absolute fraction of the size though. This is a trade-off that seems worth it for us.
Circling back after reviewing part 1: Can we find a way to pass in the boolean in the constructor for XunitReport to avoid having to extend all write_results() functions for the reports that don't care/support the option?