cmCTest: De-inline all member functions

This commit is contained in:
Regina Pfeifer 2019-03-18 22:25:50 +01:00
parent b06f8c93e5
commit 9406844616
2 changed files with 182 additions and 49 deletions

View File

@ -123,6 +123,11 @@ struct tm* cmCTest::GetNightlyTime(std::string const& str, bool tomorrowtag)
return lctime;
}
bool cmCTest::GetTomorrowTag() const
{
return this->TomorrowTag;
}
std::string cmCTest::CleanString(const std::string& str)
{
std::string::size_type spos = str.find_first_not_of(" \n\t\r\f\v");
@ -356,11 +361,21 @@ cmCTest::~cmCTest()
this->SetOutputLogFileName(nullptr);
}
int cmCTest::GetParallelLevel() const
{
return this->ParallelLevel;
}
void cmCTest::SetParallelLevel(int level)
{
this->ParallelLevel = level < 1 ? 1 : level;
}
unsigned long cmCTest::GetTestLoad() const
{
return this->TestLoad;
}
void cmCTest::SetTestLoad(unsigned long load)
{
this->TestLoad = load;
@ -764,6 +779,11 @@ void cmCTest::SetTestModel(int mode)
this->TestModel = mode;
}
int cmCTest::GetTestModel() const
{
return this->TestModel;
}
bool cmCTest::SetTest(const char* ttype, bool report)
{
if (cmSystemTools::LowerCase(ttype) == "all") {
@ -2416,6 +2436,11 @@ void cmCTest::SetNotesFiles(const char* notes)
this->NotesFiles = notes;
}
std::chrono::system_clock::time_point cmCTest::GetStopTime() const
{
return this->StopTime;
}
void cmCTest::SetStopTime(std::string const& time_str)
{
@ -2453,6 +2478,16 @@ void cmCTest::SetStopTime(std::string const& time_str)
}
}
std::string cmCTest::GetScheduleType() const
{
return this->ScheduleType;
}
void cmCTest::SetScheduleType(std::string const& type)
{
this->ScheduleType = type;
}
int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
{
bool found = false;
@ -2667,6 +2702,21 @@ std::string const& cmCTest::GetConfigType()
return this->ConfigType;
}
cmDuration cmCTest::GetTimeOut() const
{
return this->TimeOut;
}
void cmCTest::SetTimeOut(cmDuration t)
{
this->TimeOut = t;
}
cmDuration cmCTest::GetGlobalTimeout() const
{
return this->GlobalTimeout;
}
bool cmCTest::GetShowOnly()
{
return this->ShowOnly;
@ -2682,11 +2732,26 @@ int cmCTest::GetOutputAsJsonVersion()
return this->OutputAsJsonVersion;
}
bool cmCTest::ShouldUseHTTP10() const
{
return this->UseHTTP10;
}
bool cmCTest::ShouldPrintLabels() const
{
return this->PrintLabels;
}
int cmCTest::GetMaxTestNameWidth() const
{
return this->MaxTestNameWidth;
}
void cmCTest::SetMaxTestNameWidth(int w)
{
this->MaxTestNameWidth = w;
}
void cmCTest::SetProduceXML(bool v)
{
this->ProduceXML = v;
@ -2697,6 +2762,11 @@ bool cmCTest::GetProduceXML()
return this->ProduceXML;
}
std::vector<std::string>& cmCTest::GetInitialCommandLineArguments()
{
return this->InitialCommandLineArguments;
}
const char* cmCTest::GetSpecificTrack()
{
if (this->SpecificTrack.empty()) {
@ -2714,11 +2784,92 @@ void cmCTest::SetSpecificTrack(const char* track)
this->SpecificTrack = track;
}
void cmCTest::SetFailover(bool failover)
{
this->Failover = failover;
}
bool cmCTest::GetFailover() const
{
return this->Failover;
}
bool cmCTest::GetTestProgressOutput() const
{
return this->TestProgressOutput;
}
bool cmCTest::GetVerbose() const
{
return this->Verbose;
}
bool cmCTest::GetExtraVerbose() const
{
return this->ExtraVerbose;
}
void cmCTest::SetStreams(std::ostream* out, std::ostream* err)
{
this->StreamOut = out;
this->StreamErr = err;
}
bool cmCTest::GetLabelSummary() const
{
return this->LabelSummary;
}
bool cmCTest::GetSubprojectSummary() const
{
return this->SubprojectSummary;
}
const std::map<std::string, std::string>& cmCTest::GetDefinitions() const
{
return this->Definitions;
}
int cmCTest::GetTestRepeat() const
{
return this->RepeatTests;
}
bool cmCTest::GetRepeatUntilFail() const
{
return this->RepeatUntilFail;
}
void cmCTest::SetBuildID(const std::string& id)
{
this->BuildID = id;
}
std::string cmCTest::GetBuildID() const
{
return this->BuildID;
}
void cmCTest::AddSubmitFile(Part part, const char* name)
{
this->Parts[part].SubmitFiles.emplace_back(name);
}
std::vector<std::string> const& cmCTest::GetSubmitFiles(Part part) const
{
return this->Parts[part].SubmitFiles;
}
void cmCTest::ClearSubmitFiles(Part part)
{
this->Parts[part].SubmitFiles.clear();
}
void cmCTest::SetSuppressUpdatingCTestConfiguration(bool val)
{
this->SuppressUpdatingCTestConfiguration = val;
}
void cmCTest::AddCTestConfigurationOverwrite(const std::string& overStr)
{
size_t epos = overStr.find('=');

View File

@ -128,7 +128,7 @@ public:
/**
* Is the tomorrow tag set?
*/
bool GetTomorrowTag() { return this->TomorrowTag; }
bool GetTomorrowTag() const;
/**
* Try to run tests of the project
@ -137,16 +137,16 @@ public:
/** what is the configuration type, e.g. Debug, Release etc. */
std::string const& GetConfigType();
cmDuration GetTimeOut() { return this->TimeOut; }
void SetTimeOut(cmDuration t) { this->TimeOut = t; }
cmDuration GetTimeOut() const;
void SetTimeOut(cmDuration t);
cmDuration GetGlobalTimeout() { return this->GlobalTimeout; }
cmDuration GetGlobalTimeout() const;
/** how many test to run at the same time */
int GetParallelLevel() { return this->ParallelLevel; }
int GetParallelLevel() const;
void SetParallelLevel(int);
unsigned long GetTestLoad() { return this->TestLoad; }
unsigned long GetTestLoad() const;
void SetTestLoad(unsigned long);
/**
@ -164,7 +164,7 @@ public:
* Set the cmake test mode (experimental, nightly, continuous).
*/
void SetTestModel(int mode);
int GetTestModel() { return this->TestModel; }
int GetTestModel() const;
std::string GetTestModelString();
static int GetTestModelFromString(const char* str);
@ -222,26 +222,23 @@ public:
int GetOutputAsJsonVersion();
bool ShouldUseHTTP10() { return this->UseHTTP10; }
bool ShouldUseHTTP10() const;
bool ShouldPrintLabels() { return this->PrintLabels; }
bool ShouldPrintLabels() const;
bool ShouldCompressTestOutput();
bool CompressString(std::string& str);
std::chrono::system_clock::time_point GetStopTime()
{
return this->StopTime;
}
std::chrono::system_clock::time_point GetStopTime() const;
void SetStopTime(std::string const& time);
/** Used for parallel ctest job scheduling */
std::string GetScheduleType() { return this->ScheduleType; }
void SetScheduleType(std::string const& type) { this->ScheduleType = type; }
std::string GetScheduleType() const;
void SetScheduleType(std::string const& type);
/** The max output width */
int GetMaxTestNameWidth() const;
void SetMaxTestNameWidth(int w) { this->MaxTestNameWidth = w; }
void SetMaxTestNameWidth(int w);
/**
* Run a single executable command and put the stdout and stderr
@ -364,10 +361,7 @@ public:
* Should ctect configuration be updated. When using new style ctest
* script, this should be true.
*/
void SetSuppressUpdatingCTestConfiguration(bool val)
{
this->SuppressUpdatingCTestConfiguration = val;
}
void SetSuppressUpdatingCTestConfiguration(bool val);
/**
* Add overwrite to ctest configuration.
@ -424,62 +418,50 @@ public:
std::string GetColorCode(Color color) const;
/** The Build ID is assigned by CDash */
void SetBuildID(const std::string& id) { this->BuildID = id; }
std::string GetBuildID() { return this->BuildID; }
void SetBuildID(const std::string& id);
std::string GetBuildID() const;
/** Add file to be submitted */
void AddSubmitFile(Part part, const char* name);
std::vector<std::string> const& GetSubmitFiles(Part part)
{
return this->Parts[part].SubmitFiles;
}
void ClearSubmitFiles(Part part) { this->Parts[part].SubmitFiles.clear(); }
std::vector<std::string> const& GetSubmitFiles(Part part) const;
void ClearSubmitFiles(Part part);
/**
* Read the custom configuration files and apply them to the current ctest
*/
int ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf);
std::vector<std::string>& GetInitialCommandLineArguments()
{
return this->InitialCommandLineArguments;
}
std::vector<std::string>& GetInitialCommandLineArguments();
/** Set the track to submit to */
void SetSpecificTrack(const char* track);
const char* GetSpecificTrack();
void SetFailover(bool failover) { this->Failover = failover; }
bool GetFailover() { return this->Failover; }
void SetFailover(bool failover);
bool GetFailover() const;
bool GetTestProgressOutput() const { return this->TestProgressOutput; }
bool GetTestProgressOutput() const;
bool GetVerbose() { return this->Verbose; }
bool GetExtraVerbose() { return this->ExtraVerbose; }
bool GetVerbose() const;
bool GetExtraVerbose() const;
/** Direct process output to given streams. */
void SetStreams(std::ostream* out, std::ostream* err)
{
this->StreamOut = out;
this->StreamErr = err;
}
void SetStreams(std::ostream* out, std::ostream* err);
void AddSiteProperties(cmXMLWriter& xml);
bool GetLabelSummary() { return this->LabelSummary; }
bool GetSubprojectSummary() { return this->SubprojectSummary; }
bool GetLabelSummary() const;
bool GetSubprojectSummary() const;
std::string GetCostDataFile();
const std::map<std::string, std::string>& GetDefinitions()
{
return this->Definitions;
}
const std::map<std::string, std::string>& GetDefinitions() const;
/** Return the number of times a test should be run */
int GetTestRepeat() { return this->RepeatTests; }
int GetTestRepeat() const;
/** Return true if test should run until fail */
bool GetRepeatUntilFail() { return this->RepeatUntilFail; }
bool GetRepeatUntilFail() const;
void GenerateSubprojectsOutput(cmXMLWriter& xml);
std::vector<std::string> GetLabelsForSubprojects();