Commit 90cc5c5e authored by Zach's avatar Zach
Browse files

ENH: Improved test reporting output

parent d2591288
...@@ -429,12 +429,18 @@ bool cmCTestRunTest::CreateProcess(double testTimeOut, ...@@ -429,12 +429,18 @@ bool cmCTestRunTest::CreateProcess(double testTimeOut,
void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total) void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
{ {
/* Not sure whether we want to prepend the test index anymore int numWidth = 1;
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3) if(total >= 10)
<< this->Index << ": ");*/ {
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3) numWidth = 2;
}
if(total >= 100)
{
numWidth = 3;
}
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(numWidth)
<< completed << "/"); << completed << "/");
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3) cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(numWidth)
<< total << " "); << total << " ");
if ( this->TestHandler->MemCheck ) if ( this->TestHandler->MemCheck )
...@@ -443,12 +449,12 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total) ...@@ -443,12 +449,12 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
} }
else else
{ {
cmCTestLog(this->CTest, HANDLER_OUTPUT, "Testing"); cmCTestLog(this->CTest, HANDLER_OUTPUT, "Test");
} }
cmOStringStream indexStr; cmOStringStream indexStr;
indexStr << " (" << this->Index << ")"; indexStr << " #" << this->Index << ":";
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(6) cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3 + numWidth)
<< indexStr.str().c_str()); << indexStr.str().c_str());
cmCTestLog(this->CTest, HANDLER_OUTPUT, " "); cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
const int maxTestNameWidth = this->CTest->GetMaxTestNameWidth(); const int maxTestNameWidth = this->CTest->GetMaxTestNameWidth();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment