mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
cmCTestRunTest: Thread number of completed tests through start APIs
This commit is contained in:
committed by
Brad King
parent
02c5091c90
commit
62fbe5002a
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 "
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user