summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestRunTest.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestRunTest.h')
-rw-r--r--Source/CTest/cmCTestRunTest.h62
1 files changed, 33 insertions, 29 deletions
diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h
index 5f3467a..3dcc026 100644
--- a/Source/CTest/cmCTestRunTest.h
+++ b/Source/CTest/cmCTestRunTest.h
@@ -27,13 +27,17 @@ public:
cmCTestRunTest(cmCTestTestHandler* handler);
~cmCTestRunTest();
- void SetNumberOfRuns(int n) {this->NumberOfRunsLeft = n;}
- void SetRunUntilFailOn() { this->RunUntilFail = true;}
- void SetTestProperties(cmCTestTestHandler::cmCTestTestProperties * prop)
- { this->TestProperties = prop; }
-
- cmCTestTestHandler::cmCTestTestProperties * GetTestProperties()
- { return this->TestProperties; }
+ void SetNumberOfRuns(int n) { this->NumberOfRunsLeft = n; }
+ void SetRunUntilFailOn() { this->RunUntilFail = true; }
+ void SetTestProperties(cmCTestTestHandler::cmCTestTestProperties* prop)
+ {
+ this->TestProperties = prop;
+ }
+
+ cmCTestTestHandler::cmCTestTestProperties* GetTestProperties()
+ {
+ return this->TestProperties;
+ }
void SetIndex(int i) { this->Index = i; }
@@ -44,7 +48,9 @@ public:
bool IsStopTimePassed() { return this->StopTimePassed; }
cmCTestTestHandler::cmCTestTestResult GetTestResults()
- { return this->TestResult; }
+ {
+ return this->TestResult;
+ }
// Read and store output. Returns true if it must be called again.
bool CheckOutput();
@@ -52,16 +58,17 @@ public:
// Compresses the output, writing to CompressedOutput
void CompressOutput();
- //launch the test process, return whether it started correctly
+ // launch the test process, return whether it started correctly
bool StartTest(size_t total);
- //capture and report the test results
+ // capture and report the test results
bool EndTest(size_t completed, size_t total, bool started);
- //Called by ctest -N to log the command string
+ // Called by ctest -N to log the command string
void ComputeArguments();
void ComputeWeightedCost();
bool StartAgain();
+
private:
bool NeedsToRerun();
void DartProcessing();
@@ -71,18 +78,18 @@ private:
bool ForkProcess(double testTimeOut, bool explicitTimeout,
std::vector<std::string>* environment);
void WriteLogOutputTop(size_t completed, size_t total);
- //Run post processing of the process output for MemCheck
+ // Run post processing of the process output for MemCheck
void MemCheckPostProcess();
- cmCTestTestHandler::cmCTestTestProperties * TestProperties;
- //Pointer back to the "parent"; the handler that invoked this test run
- cmCTestTestHandler * TestHandler;
- cmCTest * CTest;
- cmProcess * TestProcess;
- //If the executable to run is ctest, don't create a new process;
- //just instantiate a new cmTest. (Can be disabled for a single test
- //if this option is set to false.)
- //bool OptimizeForCTest;
+ cmCTestTestHandler::cmCTestTestProperties* TestProperties;
+ // Pointer back to the "parent"; the handler that invoked this test run
+ cmCTestTestHandler* TestHandler;
+ cmCTest* CTest;
+ cmProcess* TestProcess;
+ // If the executable to run is ctest, don't create a new process;
+ // just instantiate a new cmTest. (Can be disabled for a single test
+ // if this option is set to false.)
+ // bool OptimizeForCTest;
bool UsePrefixCommand;
std::string PrefixCommand;
@@ -90,7 +97,7 @@ private:
std::string ProcessOutput;
std::string CompressedOutput;
double CompressionRatio;
- //The test results
+ // The test results
cmCTestTestHandler::cmCTestTestResult TestResult;
int Index;
std::string StartTime;
@@ -106,16 +113,13 @@ private:
inline int getNumWidth(size_t n)
{
int numWidth = 1;
- if(n >= 10)
- {
+ if (n >= 10) {
numWidth = 2;
- }
- if(n >= 100)
- {
+ }
+ if (n >= 100) {
numWidth = 3;
- }
+ }
return numWidth;
}
#endif
-