diff options
Diffstat (limited to 'Source/CTest/cmCTestRunTest.cxx')
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index f10f9c9..f15184d 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -429,12 +429,18 @@ bool cmCTestRunTest::CreateProcess(double testTimeOut, void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total) { - /* Not sure whether we want to prepend the test index anymore - cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3) - << this->Index << ": ");*/ - cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3) + int numWidth = 1; + if(total >= 10) + { + numWidth = 2; + } + if(total >= 100) + { + numWidth = 3; + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(numWidth) << completed << "/"); - cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3) + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(numWidth) << total << " "); if ( this->TestHandler->MemCheck ) @@ -443,12 +449,12 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total) } else { - cmCTestLog(this->CTest, HANDLER_OUTPUT, "Testing"); + cmCTestLog(this->CTest, HANDLER_OUTPUT, "Test"); } cmOStringStream indexStr; - indexStr << " (" << this->Index << ")"; - cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(6) + indexStr << " #" << this->Index << ":"; + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3 + numWidth) << indexStr.str().c_str()); cmCTestLog(this->CTest, HANDLER_OUTPUT, " "); const int maxTestNameWidth = this->CTest->GetMaxTestNameWidth(); |