summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestRunTest.h
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2015-03-05 21:51:10 (GMT)
committerBrad King <brad.king@kitware.com>2015-03-23 13:08:22 (GMT)
commitfde70a1b26e130663cc4c02e0530d3aadc165a41 (patch)
treeeac5b5a1a6cfe1709259430eb22e5f7a7cea48ad /Source/CTest/cmCTestRunTest.h
parent56be75b3107b210631919c13496060d648f97b14 (diff)
downloadCMake-fde70a1b26e130663cc4c02e0530d3aadc165a41.zip
CMake-fde70a1b26e130663cc4c02e0530d3aadc165a41.tar.gz
CMake-fde70a1b26e130663cc4c02e0530d3aadc165a41.tar.bz2
ctest: Add a new --repeat-until-fail option
This option tells ctest to run each test N times until the test fails or the N times have run. This is useful for finding random failing tests.
Diffstat (limited to 'Source/CTest/cmCTestRunTest.h')
-rw-r--r--Source/CTest/cmCTestRunTest.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h
index 476f3e1..3b5c831 100644
--- a/Source/CTest/cmCTestRunTest.h
+++ b/Source/CTest/cmCTestRunTest.h
@@ -27,6 +27,8 @@ 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; }
@@ -58,7 +60,10 @@ public:
void ComputeArguments();
void ComputeWeightedCost();
+
+ bool StartAgain();
private:
+ bool NeedsToRerun();
void DartProcessing();
void ExeNotFound(std::string exe);
// Figures out a final timeout which is min(STOP_TIME, NOW+TIMEOUT)
@@ -92,6 +97,10 @@ private:
std::string ActualCommand;
std::vector<std::string> Arguments;
bool StopTimePassed;
+ bool RunUntilFail;
+ int NumberOfRunsLeft;
+ bool RunAgain;
+ size_t TotalNumberOfTests;
};
inline int getNumWidth(size_t n)