summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestHandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.h')
-rw-r--r--Source/CTest/cmCTestTestHandler.h114
1 files changed, 55 insertions, 59 deletions
diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h
index 28338dd..4b74ce0 100644
--- a/Source/CTest/cmCTestTestHandler.h
+++ b/Source/CTest/cmCTestTestHandler.h
@@ -29,6 +29,7 @@ class cmCTestTestHandler : public cmCTestGenericHandler
friend class cmCTestRunTest;
friend class cmCTestMultiProcessHandler;
friend class cmCTestBatchTestHandler;
+
public:
cmTypeMacro(cmCTestTestHandler, cmCTestGenericHandler);
@@ -53,22 +54,26 @@ public:
/**
* This method is called when reading CTest custom file
*/
- void PopulateCustomVectors(cmMakefile *mf);
+ void PopulateCustomVectors(cmMakefile* mf);
///! Control the use of the regular expresisons, call these methods to turn
- ///them on
+ /// them on
void UseIncludeRegExp();
void UseExcludeRegExp();
- void SetIncludeRegExp(const char *);
- void SetExcludeRegExp(const char *);
+ void SetIncludeRegExp(const char*);
+ void SetExcludeRegExp(const char*);
- void SetMaxIndex(int n) {this->MaxIndex = n;}
- int GetMaxIndex() {return this->MaxIndex;}
+ void SetMaxIndex(int n) { this->MaxIndex = n; }
+ int GetMaxIndex() { return this->MaxIndex; }
void SetTestOutputSizePassed(int n)
- { this->CustomMaximumPassedTestOutputSize = n; }
+ {
+ this->CustomMaximumPassedTestOutputSize = n;
+ }
void SetTestOutputSizeFailed(int n)
- { this->CustomMaximumFailedTestOutputSize = n; }
+ {
+ this->CustomMaximumFailedTestOutputSize = n;
+ }
///! pass the -I argument down
void SetTestsToRunInformation(const char*);
@@ -100,12 +105,12 @@ public:
std::vector<std::string> Depends;
std::vector<std::string> AttachedFiles;
std::vector<std::string> AttachOnFail;
- std::vector<std::pair<cmsys::RegularExpression,
- std::string> > ErrorRegularExpressions;
- std::vector<std::pair<cmsys::RegularExpression,
- std::string> > RequiredRegularExpressions;
- std::vector<std::pair<cmsys::RegularExpression,
- std::string> > TimeoutRegularExpressions;
+ std::vector<std::pair<cmsys::RegularExpression, std::string> >
+ ErrorRegularExpressions;
+ std::vector<std::pair<cmsys::RegularExpression, std::string> >
+ RequiredRegularExpressions;
+ std::vector<std::pair<cmsys::RegularExpression, std::string> >
+ TimeoutRegularExpressions;
std::map<std::string, std::string> Measurements;
bool IsInBasedOnREOptions;
bool WillFail;
@@ -116,7 +121,7 @@ public:
bool ExplicitTimeout;
double AlternateTimeout;
int Index;
- //Requested number of process slots
+ // Requested number of process slots
int Processors;
// return code of test which will mark test as "not run"
int SkipReturnCode;
@@ -131,41 +136,40 @@ public:
std::string Path;
std::string Reason;
std::string FullCommandLine;
- double ExecutionTime;
- int ReturnValue;
- int Status;
- bool CompressOutput;
+ double ExecutionTime;
+ int ReturnValue;
+ int Status;
+ bool CompressOutput;
std::string CompletionStatus;
std::string Output;
std::string DartString;
- int TestCount;
+ int TestCount;
cmCTestTestProperties* Properties;
};
struct cmCTestTestResultLess
{
- bool operator() (const cmCTestTestResult &lhs,
- const cmCTestTestResult &rhs) const
+ bool operator()(const cmCTestTestResult& lhs,
+ const cmCTestTestResult& rhs) const
{
- return lhs.TestCount < rhs.TestCount;
+ return lhs.TestCount < rhs.TestCount;
}
};
// add configurations to a search path for an executable
- static void AddConfigurations(cmCTest *ctest,
- std::vector<std::string> &attempted,
- std::vector<std::string> &attemptedConfigs,
- std::string filepath,
- std::string &filename);
+ static void AddConfigurations(cmCTest* ctest,
+ std::vector<std::string>& attempted,
+ std::vector<std::string>& attemptedConfigs,
+ std::string filepath, std::string& filename);
// full signature static method to find an executable
- static std::string FindExecutable(cmCTest *ctest,
- const char *testCommand,
- std::string &resultingConfig,
- std::vector<std::string> &extraPaths,
- std::vector<std::string> &failed);
+ static std::string FindExecutable(cmCTest* ctest, const char* testCommand,
+ std::string& resultingConfig,
+ std::vector<std::string>& extraPaths,
+ std::vector<std::string>& failed);
typedef std::vector<cmCTestTestProperties> ListOfTests;
+
protected:
// compute a final test list
virtual int PreProcessHandler();
@@ -181,22 +185,24 @@ protected:
//! Clean test output to specified length
bool CleanTestOutput(std::string& output, size_t length);
- double ElapsedTestingTime;
+ double ElapsedTestingTime;
typedef std::vector<cmCTestTestResult> TestResultsVector;
- TestResultsVector TestResults;
+ TestResultsVector TestResults;
std::vector<std::string> CustomTestsIgnore;
- std::string StartTest;
- std::string EndTest;
- unsigned int StartTestTime;
- unsigned int EndTestTime;
+ std::string StartTest;
+ std::string EndTest;
+ unsigned int StartTestTime;
+ unsigned int EndTestTime;
bool MemCheck;
int CustomMaximumPassedTestOutputSize;
int CustomMaximumFailedTestOutputSize;
int MaxIndex;
+
public:
- enum { // Program statuses
+ enum
+ { // Program statuses
NOT_RUN = 0,
TIMEOUT,
SEGFAULT,
@@ -219,8 +225,8 @@ private:
/**
* Run the tests for a directory and any subdirectories
*/
- void ProcessDirectory(std::vector<std::string> &passed,
- std::vector<std::string> &failed);
+ void ProcessDirectory(std::vector<std::string>& passed,
+ std::vector<std::string>& failed);
/**
* Get the list of tests in directory and subdirectories.
@@ -236,25 +242,15 @@ private:
void UpdateMaxTestNameWidth();
- bool GetValue(const char* tag,
- std::string& value,
- std::istream& fin);
- bool GetValue(const char* tag,
- int& value,
- std::istream& fin);
- bool GetValue(const char* tag,
- size_t& value,
- std::istream& fin);
- bool GetValue(const char* tag,
- bool& value,
- std::istream& fin);
- bool GetValue(const char* tag,
- double& value,
- std::istream& fin);
+ bool GetValue(const char* tag, std::string& value, std::istream& fin);
+ bool GetValue(const char* tag, int& value, std::istream& fin);
+ bool GetValue(const char* tag, size_t& value, std::istream& fin);
+ bool GetValue(const char* tag, bool& value, std::istream& fin);
+ bool GetValue(const char* tag, double& value, std::istream& fin);
/**
* Find the executable for a test
*/
- std::string FindTheExecutable(const char *exe);
+ std::string FindTheExecutable(const char* exe);
const char* GetTestStatus(int status);
void ExpandTestsToRunInformation(size_t numPossibleTests);
@@ -263,7 +259,7 @@ private:
std::vector<std::string> CustomPreTest;
std::vector<std::string> CustomPostTest;
- std::vector<int> TestsToRun;
+ std::vector<int> TestsToRun;
bool UseIncludeLabelRegExpFlag;
bool UseExcludeLabelRegExpFlag;