cmCTestGenericHandler: Initialize SubmitIndex and Verbose

This commit is contained in:
Daniel Pfeifer 2024-10-23 14:39:47 +02:00
parent 3ee90ba838
commit 23c6de8808
3 changed files with 9 additions and 20 deletions

View File

@ -89,6 +89,9 @@ void cmCTestGenericHandler::Initialize(cmCTest* ctest)
this->TestLoad = 0;
this->Options = this->PersistentOptions;
this->MultiOptions = this->PersistentMultiOptions;
this->SetVerbose(ctest->GetExtraVerbose());
this->SetSubmitIndex(ctest->GetSubmitIndex());
}
cmValue cmCTestGenericHandler::GetOption(const std::string& op)

View File

@ -45,7 +45,6 @@
#include "cmCTestBuildHandler.h"
#include "cmCTestConfigureHandler.h"
#include "cmCTestCoverageHandler.h"
#include "cmCTestGenericHandler.h"
#include "cmCTestMemCheckHandler.h"
#include "cmCTestScriptHandler.h"
#include "cmCTestSubmitHandler.h"
@ -134,15 +133,6 @@ struct cmCTest::Private
cmCTestSubmitHandler SubmitHandler;
cmCTestUploadHandler UploadHandler;
std::vector<cmCTestGenericHandler*> GetTestingHandlers()
{
return { &this->BuildHandler, &this->CoverageHandler,
&this->ScriptHandler, &this->TestHandler,
&this->UpdateHandler, &this->ConfigureHandler,
&this->MemCheckHandler, &this->SubmitHandler,
&this->UploadHandler };
}
bool ShowOnly = false;
bool OutputAsJson = false;
int OutputAsJsonVersion = 1;
@ -772,11 +762,6 @@ int cmCTest::ProcessSteps()
this->Impl->Verbose = true;
this->Impl->ProduceXML = true;
for (auto& handler : this->Impl->GetTestingHandlers()) {
handler->SetVerbose(this->Impl->Verbose);
handler->SetSubmitIndex(this->Impl->SubmitIndex);
}
const std::string currDir = cmSystemTools::GetCurrentWorkingDirectory();
std::string workDir = currDir;
if (!this->Impl->TestDir.empty()) {
@ -2785,11 +2770,6 @@ int cmCTest::RunScripts(
cmCTestLog(this, OUTPUT, "* Extra verbosity turned on" << std::endl);
}
for (auto& handler : this->Impl->GetTestingHandlers()) {
handler->SetVerbose(this->Impl->ExtraVerbose);
handler->SetSubmitIndex(this->Impl->SubmitIndex);
}
cmCTestScriptHandler* ch = this->GetScriptHandler();
ch->Initialize(this);
ch->SetVerbose(this->Impl->Verbose);
@ -3234,6 +3214,11 @@ bool cmCTest::GetExtraVerbose() const
return this->Impl->ExtraVerbose;
}
int cmCTest::GetSubmitIndex() const
{
return this->Impl->SubmitIndex;
}
bool cmCTest::GetLabelSummary() const
{
return this->Impl->LabelSummary;

View File

@ -405,6 +405,7 @@ public:
bool GetVerbose() const;
bool GetExtraVerbose() const;
int GetSubmitIndex() const;
void AddSiteProperties(cmXMLWriter& xml);