diff options
Diffstat (limited to 'Source/CTest/cmCTestScriptHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestScriptHandler.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 78ab5ff..759b695 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -346,6 +346,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg) this->Makefile->AddDefinition("CMAKE_EXECUTABLE_NAME", cmSystemTools::GetCMakeCommand().c_str()); this->Makefile->AddDefinition("CTEST_RUN_CURRENT_SCRIPT", true); + this->SetRunCurrentScript(true); this->UpdateElapsedTime(); // add the script arg if defined @@ -527,7 +528,8 @@ int cmCTestScriptHandler::RunConfigurationScript( } // only run the curent script if we should - if (this->Makefile && this->Makefile->IsOn("CTEST_RUN_CURRENT_SCRIPT")) { + if (this->Makefile && this->Makefile->IsOn("CTEST_RUN_CURRENT_SCRIPT") && + this->ShouldRunCurrentScript) { return this->RunCurrentScript(); } return result; @@ -538,7 +540,7 @@ int cmCTestScriptHandler::RunCurrentScript() int result; // do not run twice - this->Makefile->AddDefinition("CTEST_RUN_CURRENT_SCRIPT", false); + this->SetRunCurrentScript(false); // no popup widows cmSystemTools::SetRunCommandHideConsole(true); @@ -980,3 +982,8 @@ cmDuration cmCTestScriptHandler::GetRemainingTimeAllowed() std::chrono::steady_clock::now() - this->ScriptStartTime); return (timelimit - duration); } + +void cmCTestScriptHandler::SetRunCurrentScript(bool value) +{ + this->ShouldRunCurrentScript = value; +} |