Fixed overwriting of a previous change set
This commit is contained in:
parent
b9daa192af
commit
a2ef34d344
|
@ -657,6 +657,58 @@ int cmCTestTestHandler::ProcessHandler()
|
|||
return 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
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,
|
||||
|
|
|
@ -186,6 +186,7 @@ private:
|
|||
*/
|
||||
virtual void GenerateDartOutput(std::ostream& os);
|
||||
|
||||
void PrintLabelSummary();
|
||||
/**
|
||||
* Run the tests for a directory and any subdirectories
|
||||
*/
|
||||
|
|
|
@ -1192,7 +1192,6 @@ int cmCTest::RunTest(std::vector<const char*> argv,
|
|||
{
|
||||
if ( output )
|
||||
{
|
||||
//ZACH: need to grab the output here
|
||||
tempOutput.insert(tempOutput.end(), data, data+length);
|
||||
}
|
||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, cmCTestLogWrite(data, length));
|
||||
|
@ -1205,7 +1204,6 @@ int cmCTest::RunTest(std::vector<const char*> argv,
|
|||
cmsysProcess_WaitForExit(cp, 0);
|
||||
if(output && tempOutput.begin() != tempOutput.end())
|
||||
{
|
||||
//We are waiting for exit before finally appending to the output
|
||||
output->append(&*tempOutput.begin(), tempOutput.size());
|
||||
}
|
||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "-- Process completed"
|
||||
|
|
Loading…
Reference in New Issue