Feature request: Include exit code in CTest's JUnit output
Currently using ctest --output-junit
reports only whether a test is a "run" or a "fail", see the status attribute in the testcase tag:
<testcase name="yah" classname="yah" time="0.0100318" status="run">
<system-out></system-out>
</testcase>
<testcase name="nope" classname="nope" time="0.00910038" status="fail">
<failure message="Failed"/>
<system-out></system-out>
Apparently
- status="run" means that the exitcode == 0
- status="fail" means that the exitcode != 0
It would be useful if we could add this information in its own attribute, because we could differentiate between different failure types.
For example, the following would indicate a segfault:
<testcase name="nope" classname="nope" time="0.00910038" status="fail" exitcode=139>
<failure message="Failed"/>
<system-out></system-out>
</testcase>