diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2009-09-01 15:58:04 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2009-09-01 15:58:04 (GMT) |
commit | 90cc5c5e046be5fd73af84d8d99ff1fb3c6fcf8b (patch) | |
tree | 8de7913d862f4f6588260a25c92ac1c37fe0faf7 /Source/CTest | |
parent | d25912889434de4eff7ec581374d656590fce5a7 (diff) | |
download | CMake-90cc5c5e046be5fd73af84d8d99ff1fb3c6fcf8b.zip CMake-90cc5c5e046be5fd73af84d8d99ff1fb3c6fcf8b.tar.gz CMake-90cc5c5e046be5fd73af84d8d99ff1fb3c6fcf8b.tar.bz2 |
ENH: Improved test reporting output
Diffstat (limited to 'Source/CTest')
-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(); |