mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 21:00:17 -06:00
instrumentation: include output sizes in CTest XML
This commit is contained in:
@@ -3789,6 +3789,22 @@ bool cmCTest::ConvertInstrumentationJSONFileToXML(std::string const& fpath,
|
|||||||
xml.EndElement(); // NamedMeasurement
|
xml.EndElement(); // NamedMeasurement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Record information about outputs and their sizes if found.
|
||||||
|
if (root.isMember("outputs") && root.isMember("outputSizes")) {
|
||||||
|
Json::ArrayIndex num_outputs =
|
||||||
|
std::min(root["outputs"].size(), root["outputSizes"].size());
|
||||||
|
if (num_outputs > 0) {
|
||||||
|
xml.StartElement("Outputs");
|
||||||
|
for (Json::ArrayIndex i = 0; i < num_outputs; ++i) {
|
||||||
|
xml.StartElement("Output");
|
||||||
|
xml.Attribute("name", root["outputs"][i].asString());
|
||||||
|
xml.Attribute("size", root["outputSizes"][i].asString());
|
||||||
|
xml.EndElement(); // Output
|
||||||
|
}
|
||||||
|
xml.EndElement(); // Outputs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!generating_test_xml) {
|
if (!generating_test_xml) {
|
||||||
xml.EndElement(); // role
|
xml.EndElement(); // role
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ foreach(xml_type Configure Build Test)
|
|||||||
if(NOT xml_content MATCHES "<Compile")
|
if(NOT xml_content MATCHES "<Compile")
|
||||||
set(RunCMake_TEST_FAILED "<Compile> element not found in Build.xml")
|
set(RunCMake_TEST_FAILED "<Compile> element not found in Build.xml")
|
||||||
endif()
|
endif()
|
||||||
|
if(NOT xml_content MATCHES "<Outputs")
|
||||||
|
set(RunCMake_TEST_FAILED "<Outputs> element not found in Build.xml")
|
||||||
|
endif()
|
||||||
if(NOT xml_content MATCHES "<Link")
|
if(NOT xml_content MATCHES "<Link")
|
||||||
set(RunCMake_TEST_FAILED "<Link> element not found in Build.xml")
|
set(RunCMake_TEST_FAILED "<Link> element not found in Build.xml")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user