mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Merge topic 'ctest_start_function_scope'
13347740Help: add release notes, documentation for CTEST_RUN_CURRENT_SCRIPT behavior74092d92cmCTestScriptHandler: Add new field ShouldRunCurrentScript Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1703
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -107,6 +107,8 @@ public:
|
||||
void CreateCMake();
|
||||
cmake* GetCMake() { return this->CMake; }
|
||||
|
||||
void SetRunCurrentScript(bool value);
|
||||
|
||||
private:
|
||||
// reads in a script
|
||||
int ReadInScript(const std::string& total_script_arg);
|
||||
@@ -137,6 +139,8 @@ private:
|
||||
std::vector<std::string> ConfigurationScripts;
|
||||
std::vector<bool> ScriptProcessScope;
|
||||
|
||||
bool ShouldRunCurrentScript;
|
||||
|
||||
bool Backup;
|
||||
bool EmptyBinDir;
|
||||
bool EmptyBinDirOnce;
|
||||
|
||||
@@ -126,7 +126,7 @@ bool cmCTestStartCommand::InitialPass(std::vector<std::string> const& args,
|
||||
return false;
|
||||
}
|
||||
|
||||
this->Makefile->AddDefinition("CTEST_RUN_CURRENT_SCRIPT", "OFF");
|
||||
this->CTest->SetRunCurrentScript(false);
|
||||
this->CTest->SetSuppressUpdatingCTestConfiguration(true);
|
||||
int model = this->CTest->GetTestModelFromString(smodel);
|
||||
this->CTest->SetTestModel(model);
|
||||
|
||||
Reference in New Issue
Block a user