CTest: Junit output reports timeouts as failures
Test timeouts are not reported as such in the JUnit output file. Consider:
project( Timeout )
enable_testing()
add_test( test sleep 10 )
> ctest --timeout 1 --output-junit test.xml
which results in:
> ctest --test-timeout 1
The following tests FAILED:
1 - test (Timeout)
But from the XML output there is no way telling that it was a timeout (unless one compares the test run time with the timeout setting):
> cat test.xml
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="(empty)"
tests="1"
failures="1"
disabled="0"
skipped="0"
hostname=""
time="1"
timestamp="2022-11-23T15:38:43"
>
<testcase name="test" classname="test" time="1.01297" status="fail">
<failure message=""/>
<system-out></system-out>
</testcase>
</testsuite>
I suppose the test status should remain "fail" but we could probably add the reason to "failure message"?