| 733 | }; |
| 734 | |
| 735 | cmCTestBuildHandler::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 | |
| 768 | cmCTestBuildHandler::LaunchHelper::~LaunchHelper() |
| 769 | { |
nothing calls this directly
no test coverage detected