diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2021-08-28 19:12:30 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2021-09-09 01:04:46 (GMT) |
commit | ce44c2cec306e6d7266ba3e5444ee36bce879e3d (patch) | |
tree | c16b434ea468b1d9079caf8228c5f93a69ba656a /Source/CTest/cmCTestTestHandler.cxx | |
parent | 9c8e25c5fdc3029020768116d01507bd84cbde42 (diff) | |
download | CMake-ce44c2cec306e6d7266ba3e5444ee36bce879e3d.zip CMake-ce44c2cec306e6d7266ba3e5444ee36bce879e3d.tar.gz CMake-ce44c2cec306e6d7266ba3e5444ee36bce879e3d.tar.bz2 |
ctest_memcheck: generate `DynamicAnalysis-Test.xml` as well
This is useful so that memcheck results also show up as test results on
CDash. It will be submitted with the other `MemCheck` parts.
Fixes: #22190
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 1157d10..00c1443 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -705,6 +705,21 @@ bool cmCTestTestHandler::GenerateXML() this->GenerateCTestXML(xml); } + if (this->MemCheck) { + cmGeneratedFileStream xmlfile; + if (!this->StartResultingXML(cmCTest::PartTest, "DynamicAnalysis-Test", + xmlfile)) { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot create testing XML file" << std::endl); + this->LogFile = nullptr; + return false; + } + cmXMLWriter xml(xmlfile); + // Explicitly call this class' `GenerateCTestXML` method to make `Test.xml` + // as well. + this->cmCTestTestHandler::GenerateCTestXML(xml); + } + return true; } |