diff options
author | Brad King <brad.king@kitware.com> | 2019-11-07 16:21:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-11-07 19:14:28 (GMT) |
commit | ed65b3e984ccce9b915a5a71e5a8d13b892b63d8 (patch) | |
tree | b23d0a38d6f4e16384d4acd6d575d621e478b72d /Source/CTest | |
parent | 449fceeb1fd9619d9b01f8aed0e9e5784e10dacb (diff) | |
download | CMake-ed65b3e984ccce9b915a5a71e5a8d13b892b63d8.zip CMake-ed65b3e984ccce9b915a5a71e5a8d13b892b63d8.tar.gz CMake-ed65b3e984ccce9b915a5a71e5a8d13b892b63d8.tar.bz2 |
CTest: Rename internal APIs for --repeat options
Replace use of the term "rerun" with "repeat" to match the public names.
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 6 | ||||
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 14 | ||||
-rw-r--r-- | Source/CTest/cmCTestRunTest.h | 6 |
3 files changed, 13 insertions, 13 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 9ab3c2e..992a2ef 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -171,9 +171,9 @@ bool cmCTestMultiProcessHandler::StartTestProcess(int test) this->RunningCount += GetProcessorsUsed(test); cmCTestRunTest* testRun = new cmCTestRunTest(*this); - if (this->CTest->GetRerunMode() != cmCTest::Rerun::Never) { - testRun->SetRerunMode(this->CTest->GetRerunMode()); - testRun->SetNumberOfRuns(this->CTest->GetTestRepeat()); + if (this->CTest->GetRepeatMode() != cmCTest::Repeat::Never) { + testRun->SetRepeatMode(this->CTest->GetRepeatMode()); + testRun->SetNumberOfRuns(this->CTest->GetRepeatCount()); } testRun->SetIndex(test); testRun->SetTestProperties(this->Properties[test]); diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 317f0b4..cc5de43 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -307,7 +307,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) } // If the test does not need to rerun push the current TestResult onto the // TestHandler vector - if (!this->NeedsToRerun()) { + if (!this->NeedsToRepeat()) { this->TestHandler->TestResults.push_back(this->TestResult); } this->TestProcess.reset(); @@ -333,7 +333,7 @@ bool cmCTestRunTest::StartAgain(size_t completed) return true; } -bool cmCTestRunTest::NeedsToRerun() +bool cmCTestRunTest::NeedsToRepeat() { this->NumberOfRunsLeft--; if (this->NumberOfRunsLeft == 0) { @@ -342,11 +342,11 @@ bool cmCTestRunTest::NeedsToRerun() // if number of runs left is not 0, and we are running until // we find a failed (or passed) test, then return true so the test can be // restarted - if ((this->RerunMode == cmCTest::Rerun::UntilFail && + if ((this->RepeatMode == cmCTest::Repeat::UntilFail && this->TestResult.Status == cmCTestTestHandler::COMPLETED) || - (this->RerunMode == cmCTest::Rerun::UntilPass && + (this->RepeatMode == cmCTest::Repeat::UntilPass && this->TestResult.Status != cmCTestTestHandler::COMPLETED) || - (this->RerunMode == cmCTest::Rerun::AfterTimeout && + (this->RepeatMode == cmCTest::Repeat::AfterTimeout && this->TestResult.Status == cmCTestTestHandler::TIMEOUT)) { this->RunAgain = true; return true; @@ -748,8 +748,8 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total) // got for run until pass. Trick is when this is called we don't // yet know if we are passing or failing. bool const progressOnLast = - (this->RerunMode != cmCTest::Rerun::UntilPass && - this->RerunMode != cmCTest::Rerun::AfterTimeout); + (this->RepeatMode != cmCTest::Repeat::UntilPass && + this->RepeatMode != cmCTest::Repeat::AfterTimeout); if ((progressOnLast && this->NumberOfRunsLeft == 1) || (!progressOnLast && this->NumberOfRunsLeft == this->NumberOfRunsTotal) || this->CTest->GetTestProgressOutput()) { diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h index d5e83d9..7eeaebd 100644 --- a/Source/CTest/cmCTestRunTest.h +++ b/Source/CTest/cmCTestRunTest.h @@ -35,7 +35,7 @@ public: this->NumberOfRunsTotal = n; } - void SetRerunMode(cmCTest::Rerun r) { this->RerunMode = r; } + void SetRepeatMode(cmCTest::Repeat r) { this->RepeatMode = r; } void SetTestProperties(cmCTestTestHandler::cmCTestTestProperties* prop) { this->TestProperties = prop; @@ -102,7 +102,7 @@ public: } private: - bool NeedsToRerun(); + bool NeedsToRepeat(); void DartProcessing(); void ExeNotFound(std::string exe); bool ForkProcess(cmDuration testTimeOut, bool explicitTimeout, @@ -136,7 +136,7 @@ private: std::vector<std::map< std::string, std::vector<cmCTestMultiProcessHandler::ResourceAllocation>>> AllocatedResources; - cmCTest::Rerun RerunMode = cmCTest::Rerun::Never; + cmCTest::Repeat RepeatMode = cmCTest::Repeat::Never; int NumberOfRunsLeft = 1; // default to 1 run of the test int NumberOfRunsTotal = 1; // default to 1 run of the test bool RunAgain = false; // default to not having to run again |