| 46 | } |
| 47 | |
| 48 | void 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 | |
| 79 | void cmCTestLaunchReporter::LoadLabels() |
| 80 | { |
no test coverage detected