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; return lctime;
} }
bool cmCTest::GetTomorrowTag() const
{
return this->TomorrowTag;
}
std::string cmCTest::CleanString(const std::string& str) std::string cmCTest::CleanString(const std::string& str)
{ {
std::string::size_type spos = str.find_first_not_of(" \n\t\r\f\v"); std::string::size_type spos = str.find_first_not_of(" \n\t\r\f\v");
@ -356,11 +361,21 @@ cmCTest::~cmCTest()
this->SetOutputLogFileName(nullptr); this->SetOutputLogFileName(nullptr);
} }
int cmCTest::GetParallelLevel() const
{
return this->ParallelLevel;
}
void cmCTest::SetParallelLevel(int level) void cmCTest::SetParallelLevel(int level)
{ {
this->ParallelLevel = level < 1 ? 1 : level; this->ParallelLevel = level < 1 ? 1 : level;
} }
unsigned long cmCTest::GetTestLoad() const
{
return this->TestLoad;
}
void cmCTest::SetTestLoad(unsigned long load) void cmCTest::SetTestLoad(unsigned long load)
{ {
this->TestLoad = load; this->TestLoad = load;
@ -764,6 +779,11 @@ void cmCTest::SetTestModel(int mode)
this->TestModel = mode; this->TestModel = mode;
} }
int cmCTest::GetTestModel() const
{
return this->TestModel;
}
bool cmCTest::SetTest(const char* ttype, bool report) bool cmCTest::SetTest(const char* ttype, bool report)
{ {
if (cmSystemTools::LowerCase(ttype) == "all") { if (cmSystemTools::LowerCase(ttype) == "all") {
@ -2416,6 +2436,11 @@ void cmCTest::SetNotesFiles(const char* notes)
this->NotesFiles = notes; this->NotesFiles = notes;
} }
std::chrono::system_clock::time_point cmCTest::GetStopTime() const
{
return this->StopTime;
}
void cmCTest::SetStopTime(std::string const& time_str) 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) int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
{ {
bool found = false; bool found = false;
@ -2667,6 +2702,21 @@ std::string const& cmCTest::GetConfigType()
return this->ConfigType; 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() bool cmCTest::GetShowOnly()
{ {
return this->ShowOnly; return this->ShowOnly;
@ -2682,11 +2732,26 @@ int cmCTest::GetOutputAsJsonVersion()
return this->OutputAsJsonVersion; return this->OutputAsJsonVersion;
} }
bool cmCTest::ShouldUseHTTP10() const
{
return this->UseHTTP10;
}
bool cmCTest::ShouldPrintLabels() const
{
return this->PrintLabels;
}
int cmCTest::GetMaxTestNameWidth() const int cmCTest::GetMaxTestNameWidth() const
{ {
return this->MaxTestNameWidth; return this->MaxTestNameWidth;
} }
void cmCTest::SetMaxTestNameWidth(int w)
{
this->MaxTestNameWidth = w;
}
void cmCTest::SetProduceXML(bool v) void cmCTest::SetProduceXML(bool v)
{ {
this->ProduceXML = v; this->ProduceXML = v;
@ -2697,6 +2762,11 @@ bool cmCTest::GetProduceXML()
return this->ProduceXML; return this->ProduceXML;
} }
std::vector<std::string>& cmCTest::GetInitialCommandLineArguments()
{
return this->InitialCommandLineArguments;
}
const char* cmCTest::GetSpecificTrack() const char* cmCTest::GetSpecificTrack()
{ {
if (this->SpecificTrack.empty()) { if (this->SpecificTrack.empty()) {
@ -2714,11 +2784,92 @@ void cmCTest::SetSpecificTrack(const char* track)
this->SpecificTrack = 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) void cmCTest::AddSubmitFile(Part part, const char* name)
{ {
this->Parts[part].SubmitFiles.emplace_back(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) void cmCTest::AddCTestConfigurationOverwrite(const std::string& overStr)
{ {
size_t epos = overStr.find('='); size_t epos = overStr.find('=');

View File

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