Running the following test
#include <cgreen/cgreen.h>
Describe(test);
BeforeEach(test) {}
AfterEach(test) {}
Ensure(test, segfault_should_produce_valid_junit_report) {
int *c=0;
*c=3;
}
compiled with gcc segfault.c -shared -fPIC -lcgreen -o segfault.so && cgreen-runner --xml prefix segfault.so
Produce the following broken xml report
<?xml version="1.0" encoding="ISO-8859-1" ?>
<testsuite name="segfault-test">
<testcase classname="segfault/test" name="segfault_should_produce_valid_junit_report">
<error type="Fatal" message="Test terminated with signal: Segmentation fault">
<location file="segfault.c" line="7"/>
</error>
time="0.10500"> <-- THIS LINE IS BROKEN AND OUT OF ORDER -->
</testcase>
</testsuite>