MCPcopy Create free account
hub / github.com/Kitware/CMake / AttachFile

Method AttachFile

Source/CTest/cmCTestTestHandler.cxx:1569–1586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1567}
1568
1569void cmCTestTestHandler::AttachFile(cmXMLWriter& xml, std::string const& file,
1570 std::string const& name)
1571{
1572 std::string const& base64 = this->CTest->Base64GzipEncodeFile(file);
1573 std::string const fname = cmSystemTools::GetFilenameName(file);
1574 xml.StartElement("NamedMeasurement");
1575 std::string measurement_name = name;
1576 if (measurement_name.empty()) {
1577 measurement_name = "Attached File";
1578 }
1579 xml.Attribute("name", measurement_name);
1580 xml.Attribute("encoding", "base64");
1581 xml.Attribute("compression", "tar/gzip");
1582 xml.Attribute("filename", fname);
1583 xml.Attribute("type", "file");
1584 xml.Element("Value", base64);
1585 xml.EndElement(); // NamedMeasurement
1586}
1587
1588int cmCTestTestHandler::ExecuteCommands(std::vector<std::string>& vec)
1589{

Callers 2

AttachFilesMethod · 0.95

Calls 6

Base64GzipEncodeFileMethod · 0.80
AttributeMethod · 0.80
StartElementMethod · 0.45
emptyMethod · 0.45
ElementMethod · 0.45
EndElementMethod · 0.45

Tested by

no test coverage detected