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

Method ComputeFileNames

Source/CTest/cmCTestLaunchReporter.cxx:48–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48void cmCTestLaunchReporter::ComputeFileNames()
49{
50 // We just passthru the behavior of the real command unless the
51 // CTEST_LAUNCH_LOGS environment variable is set.
52 std::string d;
53 if (!cmSystemTools::GetEnv("CTEST_LAUNCH_LOGS", d) || d.empty()) {
54 return;
55 }
56 this->Passthru = false;
57
58 // The environment variable specifies the directory into which we
59 // generate build logs.
60 this->LogDir = d;
61 cmSystemTools::ConvertToUnixSlashes(this->LogDir);
62 this->LogDir += "/";
63
64 // We hash the input command working dir and command line to obtain
65 // a repeatable and (probably) unique name for log files.
66 cmCryptoHash md5(cmCryptoHash::AlgoMD5);
67 md5.Initialize();
68 md5.Append(this->CWD);
69 for (std::string const& realArg : this->RealArgs) {
70 md5.Append(realArg);
71 }
72 this->LogHash = md5.FinalizeHex();
73
74 // We store stdout and stderr in temporary log files.
75 this->LogOut = cmStrCat(this->LogDir, "launch-", this->LogHash, "-out.txt");
76 this->LogErr = cmStrCat(this->LogDir, "launch-", this->LogHash, "-err.txt");
77}
78
79void cmCTestLaunchReporter::LoadLabels()
80{

Callers 3

cmCTestLaunchReporterMethod · 0.95
cmCTestLaunchMethod · 0.80
RunMakeCommandMethod · 0.80

Calls 5

FinalizeHexMethod · 0.80
cmStrCatFunction · 0.50
emptyMethod · 0.45
InitializeMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected