mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
ctest: Report StartTestTime in Test.xml only for tests that started
Fix commit fd55647d16 (ctest: Record `StartTestTime` entry for each
test in Test.xml, 2026-02-12) to not report an uninitialized field.
This commit is contained in:
@@ -1531,7 +1531,9 @@ void cmCTestTestHandler::WriteTestResultHeader(cmXMLWriter& xml,
|
||||
xml.Element("Path", this->CTest->GetShortPathToFile(result.Path));
|
||||
xml.Element("FullName", this->CTest->GetShortPathToFile(testPath));
|
||||
xml.Element("FullCommandLine", result.FullCommandLine);
|
||||
xml.Element("StartTestTime", result.StartTestTime);
|
||||
if (result.StartTestTime) {
|
||||
xml.Element("StartTestTime", *result.StartTestTime);
|
||||
}
|
||||
}
|
||||
|
||||
void cmCTestTestHandler::WriteTestResultFooter(cmXMLWriter& xml,
|
||||
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
std::string TestMeasurementsOutput;
|
||||
std::string InstrumentationFile;
|
||||
int TestCount = 0;
|
||||
cmDuration StartTestTime;
|
||||
cm::optional<cmDuration> StartTestTime;
|
||||
cmCTestTestProperties* Properties = nullptr;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user