diff options
author | Michael Wegner <michael_wegner@apple.com> | 2018-09-08 22:36:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-09-25 12:20:57 (GMT) |
commit | 62fbe5002aa23c7591e325e622e62a2d1ed789be (patch) | |
tree | 5a865631c9d43f6c8768f08b9d7d83e4d6ff12da /Source/CTest | |
parent | 02c5091c905964b529020070b4b24616d8a3fbd8 (diff) | |
download | CMake-62fbe5002aa23c7591e325e622e62a2d1ed789be.zip CMake-62fbe5002aa23c7591e325e622e62a2d1ed789be.tar.gz CMake-62fbe5002aa23c7591e325e622e62a2d1ed789be.tar.bz2 |
cmCTestRunTest: Thread number of completed tests through start APIs
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 4 | ||||
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 7 | ||||
-rw-r--r-- | Source/CTest/cmCTestRunTest.h | 4 |
3 files changed, 8 insertions, 7 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 3e0c1ac..f026001 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -178,7 +178,7 @@ bool cmCTestMultiProcessHandler::StartTestProcess(int test) this->Properties[test]->Directory + " : " + std::strerror(workdir.GetLastResult())); } else { - if (testRun->StartTest(this->Total)) { + if (testRun->StartTest(this->Completed, this->Total)) { return true; } } @@ -440,7 +440,7 @@ void cmCTestMultiProcessHandler::FinishTestProcess(cmCTestRunTest* runner, this->SetStopTimePassed(); } if (started) { - if (!this->StopTimePassed && runner->StartAgain()) { + if (!this->StopTimePassed && runner->StartAgain(this->Completed)) { this->Completed--; // remove the completed test because run again return; } diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 57b12f1..36604a5 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -334,7 +334,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) return passed || skipped; } -bool cmCTestRunTest::StartAgain() +bool cmCTestRunTest::StartAgain(size_t completed) { if (!this->RunAgain) { return false; @@ -349,7 +349,7 @@ bool cmCTestRunTest::StartAgain() return true; } - this->StartTest(this->TotalNumberOfTests); + this->StartTest(completed, this->TotalNumberOfTests); return true; } @@ -429,9 +429,10 @@ void cmCTestRunTest::StartFailure(std::string const& output) } // Starts the execution of a test. Returns once it has started -bool cmCTestRunTest::StartTest(size_t total) +bool cmCTestRunTest::StartTest(size_t completed, size_t total) { this->TotalNumberOfTests = total; // save for rerun case + static_cast<void>(completed); cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(2 * getNumWidth(total) + 8) << "Start " diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h index 8e24834..ab8b0da 100644 --- a/Source/CTest/cmCTestRunTest.h +++ b/Source/CTest/cmCTestRunTest.h @@ -65,7 +65,7 @@ public: void CompressOutput(); // launch the test process, return whether it started correctly - bool StartTest(size_t total); + bool StartTest(size_t completed, size_t total); // 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 @@ -73,7 +73,7 @@ public: void ComputeWeightedCost(); - bool StartAgain(); + bool StartAgain(size_t completed); void StartFailure(std::string const& output); |