mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 12:49:36 -06:00
cmCTestTestHandler: Use in-class initialization of properties and results
This commit is contained in:
@@ -30,11 +30,6 @@ cmCTestRunTest::cmCTestRunTest(cmCTestMultiProcessHandler& multiHandler)
|
|||||||
{
|
{
|
||||||
this->CTest = multiHandler.CTest;
|
this->CTest = multiHandler.CTest;
|
||||||
this->TestHandler = multiHandler.TestHandler;
|
this->TestHandler = multiHandler.TestHandler;
|
||||||
this->TestResult.ExecutionTime = cmDuration::zero();
|
|
||||||
this->TestResult.ReturnValue = 0;
|
|
||||||
this->TestResult.Status = cmCTestTestHandler::NOT_RUN;
|
|
||||||
this->TestResult.TestCount = 0;
|
|
||||||
this->TestResult.Properties = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmCTestRunTest::CheckOutput(std::string const& line)
|
void cmCTestRunTest::CheckOutput(std::string const& line)
|
||||||
|
|||||||
@@ -2431,17 +2431,6 @@ bool cmCTestTestHandler::AddTest(const std::vector<std::string>& args)
|
|||||||
"Set test directory: " << test.Directory << std::endl,
|
"Set test directory: " << test.Directory << std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
|
|
||||||
test.IsInBasedOnREOptions = true;
|
|
||||||
test.WillFail = false;
|
|
||||||
test.Disabled = false;
|
|
||||||
test.RunSerial = false;
|
|
||||||
test.Timeout = cmDuration::zero();
|
|
||||||
test.ExplicitTimeout = false;
|
|
||||||
test.Cost = 0;
|
|
||||||
test.Processors = 1;
|
|
||||||
test.WantAffinity = false;
|
|
||||||
test.SkipReturnCode = -1;
|
|
||||||
test.PreviousRuns = 0;
|
|
||||||
if (this->UseIncludeRegExpFlag &&
|
if (this->UseIncludeRegExpFlag &&
|
||||||
(!this->IncludeTestsRegularExpression.find(testname) ||
|
(!this->IncludeTestsRegularExpression.find(testname) ||
|
||||||
(!this->UseExcludeRegExpFirst &&
|
(!this->UseExcludeRegExpFirst &&
|
||||||
|
|||||||
@@ -139,22 +139,22 @@ public:
|
|||||||
std::vector<std::pair<cmsys::RegularExpression, std::string>>
|
std::vector<std::pair<cmsys::RegularExpression, std::string>>
|
||||||
TimeoutRegularExpressions;
|
TimeoutRegularExpressions;
|
||||||
std::map<std::string, std::string> Measurements;
|
std::map<std::string, std::string> Measurements;
|
||||||
bool IsInBasedOnREOptions;
|
bool IsInBasedOnREOptions = true;
|
||||||
bool WillFail;
|
bool WillFail = false;
|
||||||
bool Disabled;
|
bool Disabled = false;
|
||||||
float Cost;
|
float Cost = 0;
|
||||||
int PreviousRuns;
|
int PreviousRuns = 0;
|
||||||
bool RunSerial;
|
bool RunSerial = false;
|
||||||
cmDuration Timeout;
|
cmDuration Timeout = cmDuration::zero();
|
||||||
bool ExplicitTimeout;
|
bool ExplicitTimeout = false;
|
||||||
cmDuration AlternateTimeout;
|
cmDuration AlternateTimeout;
|
||||||
int Index;
|
int Index = 0;
|
||||||
// Requested number of process slots
|
// Requested number of process slots
|
||||||
int Processors;
|
int Processors = 1;
|
||||||
bool WantAffinity;
|
bool WantAffinity = false;
|
||||||
std::vector<size_t> Affinity;
|
std::vector<size_t> Affinity;
|
||||||
// return code of test which will mark test as "not run"
|
// return code of test which will mark test as "not run"
|
||||||
int SkipReturnCode;
|
int SkipReturnCode = -1;
|
||||||
std::vector<std::string> Environment;
|
std::vector<std::string> Environment;
|
||||||
std::vector<std::string> EnvironmentModification;
|
std::vector<std::string> EnvironmentModification;
|
||||||
std::vector<std::string> Labels;
|
std::vector<std::string> Labels;
|
||||||
@@ -175,17 +175,17 @@ public:
|
|||||||
std::string Reason;
|
std::string Reason;
|
||||||
std::string FullCommandLine;
|
std::string FullCommandLine;
|
||||||
std::string Environment;
|
std::string Environment;
|
||||||
cmDuration ExecutionTime;
|
cmDuration ExecutionTime = cmDuration::zero();
|
||||||
std::int64_t ReturnValue;
|
std::int64_t ReturnValue = 0;
|
||||||
int Status;
|
int Status = NOT_RUN;
|
||||||
std::string ExceptionStatus;
|
std::string ExceptionStatus;
|
||||||
bool CompressOutput;
|
bool CompressOutput;
|
||||||
std::string CompletionStatus;
|
std::string CompletionStatus;
|
||||||
std::string CustomCompletionStatus;
|
std::string CustomCompletionStatus;
|
||||||
std::string Output;
|
std::string Output;
|
||||||
std::string TestMeasurementsOutput;
|
std::string TestMeasurementsOutput;
|
||||||
int TestCount;
|
int TestCount = 0;
|
||||||
cmCTestTestProperties* Properties;
|
cmCTestTestProperties* Properties = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct cmCTestTestResultLess
|
struct cmCTestTestResultLess
|
||||||
|
|||||||
Reference in New Issue
Block a user