summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestHandler.cxx
diff options
context:
space:
mode:
authorFrank Winklmeier <frank.winklmeier@cern.ch>2023-02-02 15:49:17 (GMT)
committerFrank Winklmeier <frank.winklmeier@cern.ch>2023-02-02 15:57:12 (GMT)
commit6ef54e027239b33c99fab96a05a92a619ab2d991 (patch)
tree00161232bcb35d13562ba4250f27ebc249a5060a /Source/CTest/cmCTestTestHandler.cxx
parent063913f4866b254d8eccf8402c93adea9ebce031 (diff)
downloadCMake-6ef54e027239b33c99fab96a05a92a619ab2d991.zip
CMake-6ef54e027239b33c99fab96a05a92a619ab2d991.tar.gz
CMake-6ef54e027239b33c99fab96a05a92a619ab2d991.tar.bz2
CTest: add test failure reason to JUnit XML output
In case of test failure, add the test failure reason (e.g. "Timeout") to the failure message in the XML file. This is the same value that is shown in the ctest text output. Fixes: #24184
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 1c8c713..1d509cf 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -2569,7 +2569,7 @@ bool cmCTestTestHandler::WriteJUnitXML()
xml.EndElement(); // </skipped>
} else if (status == "fail") {
xml.StartElement("failure");
- xml.Attribute("message", result.Reason);
+ xml.Attribute("message", this->GetTestStatus(result));
xml.EndElement(); // </failure>
}