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

Method LaunchHelper

Source/CTest/cmCTestBuildHandler.cxx:735–766  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

733};
734
735cmCTestBuildHandler::LaunchHelper::LaunchHelper(cmCTestBuildHandler* handler)
736 : Handler(handler)
737 , CTest(handler->CTest)
738{
739 std::string tag = this->CTest->GetCurrentTag();
740 if (tag.empty()) {
741 // This is not for a dashboard submission, so there is no XML.
742 // Skip enabling the launchers.
743 this->Handler->UseCTestLaunch = false;
744 } else {
745 // Compute a directory in which to store launcher fragments.
746 std::string& launchDir = this->Handler->CTestLaunchDir;
747 launchDir =
748 cmStrCat(this->CTest->GetBinaryDir(), "/Testing/", tag, "/Build");
749
750 // Clean out any existing launcher fragments.
751 cmSystemTools::RemoveADirectory(launchDir);
752
753 if (this->Handler->UseCTestLaunch) {
754 // Enable launcher fragments.
755 cmSystemTools::MakeDirectory(launchDir);
756 this->WriteLauncherConfig();
757 std::string launchEnv = cmStrCat("CTEST_LAUNCH_LOGS=", launchDir);
758 cmSystemTools::PutEnv(launchEnv);
759 }
760 }
761
762 // If not using launchers, make sure they passthru.
763 if (!this->Handler->UseCTestLaunch) {
764 cmSystemTools::UnsetEnv("CTEST_LAUNCH_LOGS");
765 }
766}
767
768cmCTestBuildHandler::LaunchHelper::~LaunchHelper()
769{

Callers

nothing calls this directly

Calls 5

WriteLauncherConfigMethod · 0.95
GetCurrentTagMethod · 0.80
GetBinaryDirMethod · 0.80
cmStrCatFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected