diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2009-08-19 13:24:55 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2009-08-19 13:24:55 (GMT) |
commit | a2ef34d34459261a13cc3e8ff8375165d4abfceb (patch) | |
tree | fc6874bdcf37b4c664c7873a98ad1b8acc94deb3 /Source/CTest/cmCTestTestHandler.cxx | |
parent | b9daa192af92266a375707e56963ebdb888065e4 (diff) | |
download | CMake-a2ef34d34459261a13cc3e8ff8375165d4abfceb.zip CMake-a2ef34d34459261a13cc3e8ff8375165d4abfceb.tar.gz CMake-a2ef34d34459261a13cc3e8ff8375165d4abfceb.tar.bz2 |
Fixed overwriting of a previous change set
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 2ff8e30..62b111f 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -658,6 +658,58 @@ int cmCTestTestHandler::ProcessHandler() } //---------------------------------------------------------------------- +void cmCTestTestHandler::PrintLabelSummary() +{ + cmCTestTestHandler::ListOfTests::iterator it = this->TestList.begin(); + cmCTestTestHandler::TestResultsVector::iterator ri = + this->TestResults.begin(); + std::map<cmStdString, double> labelTimes; + std::set<cmStdString> labels; + // initialize maps + for(; it != this->TestList.end(); ++it) + { + cmCTestTestProperties& p = *it; + if(p.Labels.size() != 0) + { + for(std::vector<std::string>::iterator l = p.Labels.begin(); + l != p.Labels.end(); ++l) + { + labels.insert(*l); + labelTimes[*l] = 0; + } + } + } + it = this->TestList.begin(); + ri = this->TestResults.begin(); + // fill maps + for(; it != this->TestList.end(); ++it, ++ri) + { + cmCTestTestProperties& p = *it; + cmCTestTestResult &result = *ri; + if(p.Labels.size() != 0) + { + for(std::vector<std::string>::iterator l = p.Labels.begin(); + l != p.Labels.end(); ++l) + { + labelTimes[*l] += result.ExecutionTime; + } + } + } + // now print times + for(std::set<cmStdString>::const_iterator i = labels.begin(); + i != labels.end(); ++i) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, "\nTime in " + << *i << " = " << labelTimes[*i] << " sec" ); + if ( this->LogFile ) + { + *this->LogFile << "\nTime in " << *i << " = " + << labelTimes[*i] << " sec" << std::endl; + } + } +} + +//---------------------------------------------------------------------- void cmCTestTestHandler::ProcessOneTest(cmCTestTestProperties *it, std::vector<cmStdString> &passed, std::vector<cmStdString> &failed, |