diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2009-09-02 14:08:40 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2009-09-02 14:08:40 (GMT) |
commit | 69fd641adb32c878ded4cadee60d90596b358d1b (patch) | |
tree | cd9885d9d8a0825b4a3bc227f78780ebf1a1e95b /Source/CTest/cmCTestRunTest.cxx | |
parent | 99144383cf17e188f67a5d9e3469bcf1b3a836b8 (diff) | |
download | CMake-69fd641adb32c878ded4cadee60d90596b358d1b.zip CMake-69fd641adb32c878ded4cadee60d90596b358d1b.tar.gz CMake-69fd641adb32c878ded4cadee60d90596b358d1b.tar.bz2 |
Fixed ctest output where max test index is not the same width as the total number of tests. Also some preliminary changes for batching ctest jobs
Diffstat (limited to 'Source/CTest/cmCTestRunTest.cxx')
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index f15184d..49bce1e 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -429,18 +429,10 @@ bool cmCTestRunTest::CreateProcess(double testTimeOut, void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total) { - int numWidth = 1; - if(total >= 10) - { - numWidth = 2; - } - if(total >= 100) - { - numWidth = 3; - } - cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(numWidth) + + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(getNumWidth(total)) << completed << "/"); - cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(numWidth) + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(getNumWidth(total)) << total << " "); if ( this->TestHandler->MemCheck ) @@ -454,7 +446,8 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total) cmOStringStream indexStr; indexStr << " #" << this->Index << ":"; - cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3 + numWidth) + cmCTestLog(this->CTest, HANDLER_OUTPUT, + std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex())) << indexStr.str().c_str()); cmCTestLog(this->CTest, HANDLER_OUTPUT, " "); const int maxTestNameWidth = this->CTest->GetMaxTestNameWidth(); |