summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-08-18 18:03:50 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-08-18 18:03:50 (GMT)
commitc02c8c287c4c92b6e420a91af09195f57ffbcc41 (patch)
treec25a19a192e654c2f97651839550be67b8edaf47 /Source
parent3c34d0440c8c83124d991850535e69af6ccc684e (diff)
downloadCMake-c02c8c287c4c92b6e420a91af09195f57ffbcc41.zip
CMake-c02c8c287c4c92b6e420a91af09195f57ffbcc41.tar.gz
CMake-c02c8c287c4c92b6e420a91af09195f57ffbcc41.tar.bz2
Add test times to log file as well as the stdout.
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 37de4f9..1494ee6 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -594,7 +594,10 @@ int cmCTestTestHandler::ProcessHandler()
sprintf(buf, "%6.2f sec", totalTestTime);
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\nTotal Test time = "
<< buf << "\n" );
-
+ if ( this->LogFile )
+ {
+ *this->LogFile << "\nTotal Test time = " << buf << std::endl;
+ }
}
if (failed.size())
@@ -699,7 +702,12 @@ void cmCTestTestHandler::PrintLabelSummary()
i != labels.end(); ++i)
{
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\nTime in "
- << *i << " = " << labelTimes[*i] << " sec" );
+ << *i << " = " << labelTimes[*i] << " sec" );
+ if ( this->LogFile )
+ {
+ *this->LogFile << "\nTime in " << *i << " = "
+ << labelTimes[*i] << " sec" << std::endl;
+ }
}
}
@@ -942,6 +950,10 @@ void cmCTestTestHandler::ProcessOneTest(cmCTestTestProperties *it,
char buf[1024];
sprintf(buf, "%6.2f sec", cres.ExecutionTime);
cmCTestLog(this->CTest, HANDLER_OUTPUT, buf << "\n" );
+ if ( this->LogFile )
+ {
+ *this->LogFile << "\nTest time = " << buf << std::endl;
+ }
if (!output.empty() && output.find("<DartMeasurement") != output.npos)
{
if (this->DartStuff.find(output.c_str()))