mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-14 05:20:50 -05:00
cmCTest*Handler: Use default member initialization
This commit is contained in:
@@ -178,27 +178,8 @@ static cmCTestBuildCompileErrorWarningRex cmCTestWarningErrorFileLine[] = {
|
||||
|
||||
cmCTestBuildHandler::cmCTestBuildHandler(cmCTest* ctest)
|
||||
: Superclass(ctest)
|
||||
, LastErrorOrWarning(this->ErrorsAndWarnings.end())
|
||||
{
|
||||
this->MaxPreContext = 10;
|
||||
this->MaxPostContext = 10;
|
||||
|
||||
this->MaxErrors = 50;
|
||||
this->MaxWarnings = 50;
|
||||
|
||||
this->LastErrorOrWarning = this->ErrorsAndWarnings.end();
|
||||
|
||||
this->UseCTestLaunch = false;
|
||||
|
||||
this->BuildOutputLogSize = 0;
|
||||
this->OutputLineCounter = 0;
|
||||
this->PostContextCount = 0;
|
||||
|
||||
this->TotalErrors = 0;
|
||||
this->TotalWarnings = 0;
|
||||
this->LastTickChar = 0;
|
||||
|
||||
this->ErrorQuotaReached = false;
|
||||
this->WarningQuotaReached = false;
|
||||
}
|
||||
|
||||
void cmCTestBuildHandler::PopulateCustomVectors(cmMakefile* mf)
|
||||
|
||||
@@ -116,34 +116,34 @@ private:
|
||||
|
||||
t_BuildProcessingQueueType BuildProcessingQueue;
|
||||
t_BuildProcessingQueueType BuildProcessingErrorQueue;
|
||||
size_t BuildOutputLogSize;
|
||||
size_t BuildOutputLogSize = 0;
|
||||
std::vector<char> CurrentProcessingLine;
|
||||
|
||||
std::string SimplifySourceDir;
|
||||
std::string SimplifyBuildDir;
|
||||
size_t OutputLineCounter;
|
||||
size_t OutputLineCounter = 0;
|
||||
using t_ErrorsAndWarningsVector = std::vector<cmCTestBuildErrorWarning>;
|
||||
t_ErrorsAndWarningsVector ErrorsAndWarnings;
|
||||
t_ErrorsAndWarningsVector::iterator LastErrorOrWarning;
|
||||
size_t PostContextCount;
|
||||
size_t MaxPreContext;
|
||||
size_t MaxPostContext;
|
||||
size_t PostContextCount = 0;
|
||||
size_t MaxPreContext = 10;
|
||||
size_t MaxPostContext = 10;
|
||||
std::deque<std::string> PreContext;
|
||||
|
||||
int TotalErrors;
|
||||
int TotalWarnings;
|
||||
char LastTickChar;
|
||||
int TotalErrors = 0;
|
||||
int TotalWarnings = 0;
|
||||
char LastTickChar = '\0';
|
||||
|
||||
bool ErrorQuotaReached;
|
||||
bool WarningQuotaReached;
|
||||
bool ErrorQuotaReached = false;
|
||||
bool WarningQuotaReached = false;
|
||||
|
||||
int MaxErrors;
|
||||
int MaxWarnings;
|
||||
int MaxErrors = 50;
|
||||
int MaxWarnings = 50;
|
||||
|
||||
// Used to remove ANSI color codes before checking for errors and warnings.
|
||||
cmStringReplaceHelper* ColorRemover;
|
||||
|
||||
bool UseCTestLaunch;
|
||||
bool UseCTestLaunch = false;
|
||||
std::string CTestLaunchDir;
|
||||
class LaunchHelper;
|
||||
|
||||
|
||||
@@ -11,12 +11,6 @@
|
||||
cmCTestGenericHandler::cmCTestGenericHandler(cmCTest* ctest)
|
||||
: CTest(ctest)
|
||||
{
|
||||
this->HandlerVerbose = cmSystemTools::OUTPUT_NONE;
|
||||
this->SubmitIndex = 0;
|
||||
this->AppendXML = false;
|
||||
this->Quiet = false;
|
||||
this->TestLoad = 0;
|
||||
|
||||
this->SetVerbose(ctest->GetExtraVerbose());
|
||||
this->SetSubmitIndex(ctest->GetSubmitIndex());
|
||||
}
|
||||
|
||||
@@ -70,13 +70,13 @@ protected:
|
||||
cmGeneratedFileStream& xofs);
|
||||
bool StartLogFile(const char* name, cmGeneratedFileStream& xofs);
|
||||
|
||||
bool AppendXML;
|
||||
bool Quiet;
|
||||
unsigned long TestLoad;
|
||||
cmSystemTools::OutputOption HandlerVerbose;
|
||||
bool AppendXML = false;
|
||||
bool Quiet = false;
|
||||
unsigned long TestLoad = 0;
|
||||
cmSystemTools::OutputOption HandlerVerbose = cmSystemTools::OUTPUT_NONE;
|
||||
cmCTest* CTest;
|
||||
t_StringToString LogFileNames;
|
||||
cmake* CMake = nullptr;
|
||||
|
||||
int SubmitIndex;
|
||||
int SubmitIndex = 0;
|
||||
};
|
||||
|
||||
@@ -124,9 +124,6 @@ cmCTestMemCheckHandler::cmCTestMemCheckHandler(cmCTest* ctest)
|
||||
this->MemCheck = true;
|
||||
this->TestOptions.OutputSizePassed = 0;
|
||||
this->TestOptions.OutputSizeFailed = 0;
|
||||
this->LogWithPID = false;
|
||||
this->MemoryTesterStyle = UNKNOWN;
|
||||
this->DefectCount = 0;
|
||||
}
|
||||
|
||||
int cmCTestMemCheckHandler::PreProcessHandler()
|
||||
|
||||
@@ -99,15 +99,15 @@ private:
|
||||
std::string MemoryTester;
|
||||
std::vector<std::string> MemoryTesterDynamicOptions;
|
||||
std::vector<std::string> MemoryTesterOptions;
|
||||
int MemoryTesterStyle;
|
||||
int MemoryTesterStyle = UNKNOWN;
|
||||
std::string MemoryTesterOutputFile;
|
||||
std::string MemoryTesterEnvironmentVariable;
|
||||
// these are used to store the types of errors that can show up
|
||||
std::vector<std::string> ResultStrings;
|
||||
std::vector<std::string> ResultStringsLong;
|
||||
std::vector<int> GlobalResults;
|
||||
bool LogWithPID; // does log file add pid
|
||||
int DefectCount;
|
||||
bool LogWithPID = false; // does log file add pid
|
||||
int DefectCount = 0;
|
||||
|
||||
std::vector<int>::size_type FindOrAddWarning(const std::string& warning);
|
||||
// initialize the ResultStrings and ResultStringsLong for
|
||||
|
||||
@@ -125,10 +125,6 @@ cmCTestSubmitHandler::cmCTestSubmitHandler(cmCTest* ctest)
|
||||
p = static_cast<cmCTest::Part>(p + 1)) {
|
||||
this->SubmitPart[p] = true;
|
||||
}
|
||||
this->HasWarnings = false;
|
||||
this->HasErrors = false;
|
||||
this->HTTPProxyType = 0;
|
||||
this->LogFile = nullptr;
|
||||
}
|
||||
|
||||
bool cmCTestSubmitHandler::SubmitUsingHTTP(
|
||||
|
||||
@@ -66,12 +66,12 @@ private:
|
||||
class ResponseParser;
|
||||
|
||||
std::string HTTPProxy;
|
||||
int HTTPProxyType;
|
||||
int HTTPProxyType = 0;
|
||||
std::string HTTPProxyAuth;
|
||||
std::ostream* LogFile;
|
||||
std::ostream* LogFile = nullptr;
|
||||
bool SubmitPart[cmCTest::PartCount];
|
||||
bool HasWarnings;
|
||||
bool HasErrors;
|
||||
bool HasWarnings = false;
|
||||
bool HasErrors = false;
|
||||
std::set<std::string> Files;
|
||||
std::vector<std::string> HttpHeaders;
|
||||
|
||||
|
||||
@@ -278,14 +278,6 @@ cmCTestTestHandler::cmCTestTestHandler(cmCTest* ctest)
|
||||
: Superclass(ctest)
|
||||
, TestOptions(ctest->GetTestOptions())
|
||||
{
|
||||
this->UseIncludeRegExpFlag = false;
|
||||
this->UseExcludeRegExpFlag = false;
|
||||
this->UseExcludeRegExpFirst = false;
|
||||
|
||||
this->MemCheck = false;
|
||||
|
||||
this->LogFile = nullptr;
|
||||
|
||||
// Regular expressions to scan test output for custom measurements.
|
||||
|
||||
// Capture the whole section of test output from the first opening
|
||||
@@ -304,8 +296,6 @@ cmCTestTestHandler::cmCTestTestHandler(cmCTest* ctest)
|
||||
|
||||
// Capture content from <CTestLabel>...</CTestLabel>
|
||||
this->CustomLabelRegex.compile("<CTestLabel>(.*)</CTestLabel>");
|
||||
|
||||
this->ElapsedTestingTime = cmDuration();
|
||||
}
|
||||
|
||||
void cmCTestTestHandler::PopulateCustomVectors(cmMakefile* mf)
|
||||
|
||||
@@ -271,7 +271,7 @@ protected:
|
||||
std::string EndTest;
|
||||
std::chrono::system_clock::time_point StartTestTime;
|
||||
std::chrono::system_clock::time_point EndTestTime;
|
||||
bool MemCheck;
|
||||
bool MemCheck = false;
|
||||
int MaxIndex;
|
||||
|
||||
public:
|
||||
@@ -348,9 +348,9 @@ private:
|
||||
|
||||
std::vector<int> TestsToRun;
|
||||
|
||||
bool UseIncludeRegExpFlag;
|
||||
bool UseExcludeRegExpFlag;
|
||||
bool UseExcludeRegExpFirst;
|
||||
bool UseIncludeRegExpFlag = false;
|
||||
bool UseExcludeRegExpFlag = false;
|
||||
bool UseExcludeRegExpFirst = false;
|
||||
std::vector<cmsys::RegularExpression> IncludeLabelRegularExpressions;
|
||||
std::vector<cmsys::RegularExpression> ExcludeLabelRegularExpressions;
|
||||
cmsys::RegularExpression IncludeTestsRegularExpression;
|
||||
@@ -373,7 +373,7 @@ private:
|
||||
cmsys::RegularExpression CustomCompletionStatusRegex;
|
||||
cmsys::RegularExpression CustomLabelRegex;
|
||||
|
||||
std::ostream* LogFile;
|
||||
std::ostream* LogFile = nullptr;
|
||||
|
||||
cmCTest::Repeat RepeatMode = cmCTest::Repeat::Never;
|
||||
int RepeatCount = 1;
|
||||
|
||||
@@ -38,7 +38,6 @@ static const char* cmCTestUpdateHandlerUpdateToString(int type)
|
||||
cmCTestUpdateHandler::cmCTestUpdateHandler(cmCTest* ctest)
|
||||
: Superclass(ctest)
|
||||
{
|
||||
this->UpdateType = e_CVS;
|
||||
}
|
||||
|
||||
int cmCTestUpdateHandler::DetermineType(const char* cmd, const char* type)
|
||||
|
||||
@@ -55,7 +55,7 @@ private:
|
||||
// The VCS command to update the working tree.
|
||||
std::string UpdateCommand;
|
||||
std::string SourceDirectory;
|
||||
int UpdateType;
|
||||
int UpdateType = e_CVS;
|
||||
|
||||
int DetectVCS(const std::string& dir);
|
||||
bool SelectVCS();
|
||||
|
||||
Reference in New Issue
Block a user