2008-07-03 13:31:33 +00:00
|
|
|
/*=========================================================================
|
|
|
|
|
|
|
|
Program: CMake - Cross-Platform Makefile Generator
|
|
|
|
Module: $RCSfile$
|
|
|
|
Language: C++
|
|
|
|
Date: $Date$
|
|
|
|
Version: $Revision$
|
|
|
|
|
|
|
|
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
|
|
|
|
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
|
|
|
|
|
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
PURPOSE. See the above copyright notices for more information.
|
|
|
|
|
|
|
|
=========================================================================*/
|
|
|
|
#include "cmCTestMultiProcessHandler.h"
|
|
|
|
#include "cmProcess.h"
|
|
|
|
#include "cmStandardIncludes.h"
|
|
|
|
#include "cmCTest.h"
|
2009-08-27 14:37:30 +00:00
|
|
|
#include "cmSystemTools.h"
|
|
|
|
#include <stdlib.h>
|
2008-07-03 13:31:33 +00:00
|
|
|
|
|
|
|
cmCTestMultiProcessHandler::cmCTestMultiProcessHandler()
|
|
|
|
{
|
|
|
|
this->ParallelLevel = 1;
|
2009-08-28 15:08:39 +00:00
|
|
|
this->Completed = 0;
|
2009-09-07 14:26:17 +00:00
|
|
|
this->RunningCount = 0;
|
2008-07-03 13:31:33 +00:00
|
|
|
}
|
2009-09-10 15:16:08 +00:00
|
|
|
|
|
|
|
cmCTestMultiProcessHandler::~cmCTestMultiProcessHandler()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-07-03 13:31:33 +00:00
|
|
|
// Set the tests
|
|
|
|
void
|
2008-07-04 14:28:22 +00:00
|
|
|
cmCTestMultiProcessHandler::SetTests(TestMap& tests,
|
2009-08-26 16:09:06 +00:00
|
|
|
PropertiesMap& properties)
|
2008-07-03 13:31:33 +00:00
|
|
|
{
|
2009-09-08 17:39:13 +00:00
|
|
|
this->Tests = tests;
|
|
|
|
this->Properties = properties;
|
|
|
|
this->Total = this->Tests.size();
|
2008-07-03 13:31:33 +00:00
|
|
|
// set test run map to false for all
|
2008-07-04 14:28:22 +00:00
|
|
|
for(TestMap::iterator i = this->Tests.begin();
|
2008-07-03 13:31:33 +00:00
|
|
|
i != this->Tests.end(); ++i)
|
|
|
|
{
|
|
|
|
this->TestRunningMap[i->first] = false;
|
|
|
|
this->TestFinishMap[i->first] = false;
|
|
|
|
}
|
2009-09-08 21:10:35 +00:00
|
|
|
this->ReadCostData();
|
|
|
|
this->CreateTestCostList();
|
2008-07-03 13:31:33 +00:00
|
|
|
}
|
2009-08-27 14:37:30 +00:00
|
|
|
|
2008-07-03 13:31:33 +00:00
|
|
|
// Set the max number of tests that can be run at the same time.
|
2009-08-26 16:09:06 +00:00
|
|
|
void cmCTestMultiProcessHandler::SetParallelLevel(size_t level)
|
2008-07-03 13:31:33 +00:00
|
|
|
{
|
2009-08-26 16:09:06 +00:00
|
|
|
this->ParallelLevel = level < 1 ? 1 : level;
|
2008-07-03 13:31:33 +00:00
|
|
|
}
|
|
|
|
|
2009-09-08 17:39:13 +00:00
|
|
|
//---------------------------------------------------------
|
2008-07-03 13:31:33 +00:00
|
|
|
void cmCTestMultiProcessHandler::RunTests()
|
|
|
|
{
|
2009-08-27 14:37:30 +00:00
|
|
|
this->CheckResume();
|
2009-09-02 14:08:40 +00:00
|
|
|
this->TestHandler->SetMaxIndex(this->FindMaxIndex());
|
2008-07-03 13:31:33 +00:00
|
|
|
this->StartNextTests();
|
2009-09-08 17:39:13 +00:00
|
|
|
while(this->Tests.size() != 0)
|
2008-07-03 13:31:33 +00:00
|
|
|
{
|
|
|
|
this->CheckOutput();
|
|
|
|
this->StartNextTests();
|
|
|
|
}
|
|
|
|
// let all running tests finish
|
|
|
|
while(this->CheckOutput())
|
|
|
|
{
|
|
|
|
}
|
2009-08-27 14:37:30 +00:00
|
|
|
this->MarkFinished();
|
2008-07-03 13:31:33 +00:00
|
|
|
}
|
|
|
|
|
2009-09-08 17:39:13 +00:00
|
|
|
//---------------------------------------------------------
|
2008-07-03 13:31:33 +00:00
|
|
|
void cmCTestMultiProcessHandler::StartTestProcess(int test)
|
|
|
|
{
|
2009-09-08 18:48:23 +00:00
|
|
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "test " << test << "\n");
|
2008-07-03 13:31:33 +00:00
|
|
|
this->TestRunningMap[test] = true; // mark the test as running
|
|
|
|
// now remove the test itself
|
2009-09-08 17:39:13 +00:00
|
|
|
this->EraseTest(test);
|
|
|
|
|
2009-09-11 14:09:48 +00:00
|
|
|
cmCTestRunTest* testRun = new cmCTestRunTest(this->TestHandler);
|
2009-08-26 16:09:06 +00:00
|
|
|
testRun->SetIndex(test);
|
|
|
|
testRun->SetTestProperties(this->Properties[test]);
|
|
|
|
if(testRun->StartTest())
|
2008-07-03 13:31:33 +00:00
|
|
|
{
|
2009-08-26 16:09:06 +00:00
|
|
|
this->RunningTests.insert(testRun);
|
2008-07-03 13:31:33 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-09-03 19:33:44 +00:00
|
|
|
this->Completed++;
|
2009-09-07 14:26:17 +00:00
|
|
|
this->RunningCount -= GetProcessorsUsed(test);
|
2009-09-03 19:33:44 +00:00
|
|
|
testRun->EndTest(this->Completed, this->Total, false);
|
2009-09-23 19:37:50 +00:00
|
|
|
this->Failed->push_back(this->Properties[test]->Name);
|
2008-07-03 13:31:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-09-08 17:39:13 +00:00
|
|
|
//---------------------------------------------------------
|
|
|
|
void cmCTestMultiProcessHandler::EraseTest(int test)
|
|
|
|
{
|
|
|
|
this->Tests.erase(test);
|
|
|
|
for(TestCostMap::iterator i = this->TestCosts.begin();
|
|
|
|
i != this->TestCosts.end(); ++i)
|
|
|
|
{
|
|
|
|
if(i->second.find(test) != i->second.end())
|
|
|
|
{
|
|
|
|
i->second.erase(test);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
2009-09-07 14:26:17 +00:00
|
|
|
inline size_t cmCTestMultiProcessHandler::GetProcessorsUsed(int test)
|
|
|
|
{
|
|
|
|
size_t processors =
|
|
|
|
static_cast<int>(this->Properties[test]->Processors);
|
|
|
|
//If this is set to run serially, it must run alone.
|
|
|
|
//Also, if processors setting is set higher than the -j
|
|
|
|
//setting, we default to using all of the process slots.
|
|
|
|
if(this->Properties[test]->RunSerial
|
|
|
|
|| processors > this->ParallelLevel)
|
|
|
|
{
|
|
|
|
processors = this->ParallelLevel;
|
|
|
|
}
|
|
|
|
return processors;
|
|
|
|
}
|
|
|
|
|
2009-09-08 17:39:13 +00:00
|
|
|
//---------------------------------------------------------
|
2008-07-03 13:31:33 +00:00
|
|
|
bool cmCTestMultiProcessHandler::StartTest(int test)
|
|
|
|
{
|
|
|
|
// copy the depend tests locally because when
|
|
|
|
// a test is finished it will be removed from the depend list
|
|
|
|
// and we don't want to be iterating a list while removing from it
|
2008-07-04 14:28:22 +00:00
|
|
|
TestSet depends = this->Tests[test];
|
2008-07-03 13:31:33 +00:00
|
|
|
size_t totalDepends = depends.size();
|
|
|
|
if(totalDepends)
|
|
|
|
{
|
2008-07-04 14:28:22 +00:00
|
|
|
for(TestSet::const_iterator i = depends.begin();
|
2008-07-03 13:31:33 +00:00
|
|
|
i != depends.end(); ++i)
|
|
|
|
{
|
|
|
|
// if the test is not already running then start it
|
|
|
|
if(!this->TestRunningMap[*i])
|
|
|
|
{
|
|
|
|
// this test might be finished, but since
|
|
|
|
// this is a copy of the depend map we might
|
|
|
|
// still have it
|
|
|
|
if(!this->TestFinishMap[*i])
|
|
|
|
{
|
|
|
|
// only start one test in this function
|
|
|
|
return this->StartTest(*i);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// the depend has been and finished
|
|
|
|
totalDepends--;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// if there are no depends left then run this test
|
|
|
|
if(totalDepends == 0)
|
|
|
|
{
|
|
|
|
this->StartTestProcess(test);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
// This test was not able to start because it is waiting
|
|
|
|
// on depends to run
|
2009-08-26 16:09:06 +00:00
|
|
|
return false;
|
2008-07-03 13:31:33 +00:00
|
|
|
}
|
|
|
|
|
2009-09-08 17:39:13 +00:00
|
|
|
//---------------------------------------------------------
|
2008-07-03 13:31:33 +00:00
|
|
|
void cmCTestMultiProcessHandler::StartNextTests()
|
|
|
|
{
|
2009-09-07 14:26:17 +00:00
|
|
|
size_t numToStart = this->ParallelLevel - this->RunningCount;
|
2008-07-03 13:31:33 +00:00
|
|
|
if(numToStart == 0)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
2009-09-04 14:16:06 +00:00
|
|
|
|
2009-09-08 17:39:13 +00:00
|
|
|
for(TestCostMap::reverse_iterator i = this->TestCosts.rbegin();
|
|
|
|
i != this->TestCosts.rend(); ++i)
|
2008-07-03 13:31:33 +00:00
|
|
|
{
|
2009-09-08 17:39:13 +00:00
|
|
|
TestSet tests = i->second; //copy the test set
|
|
|
|
for(TestSet::iterator test = tests.begin();
|
|
|
|
test != tests.end(); ++test)
|
2008-07-03 13:31:33 +00:00
|
|
|
{
|
2009-09-08 17:39:13 +00:00
|
|
|
size_t processors = GetProcessorsUsed(*test);
|
|
|
|
if(processors > numToStart)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if(this->StartTest(*test))
|
|
|
|
{
|
|
|
|
numToStart -= processors;
|
|
|
|
this->RunningCount += processors;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl
|
|
|
|
<< "Test did not start waiting on depends to finish: "
|
|
|
|
<< *test << "\n");
|
|
|
|
}
|
|
|
|
if(numToStart == 0)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
2008-07-03 13:31:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-09-08 17:39:13 +00:00
|
|
|
//---------------------------------------------------------
|
2008-07-03 13:31:33 +00:00
|
|
|
bool cmCTestMultiProcessHandler::CheckOutput()
|
|
|
|
{
|
|
|
|
// no more output we are done
|
|
|
|
if(this->RunningTests.size() == 0)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2009-08-26 16:09:06 +00:00
|
|
|
std::vector<cmCTestRunTest*> finished;
|
2008-07-03 13:31:33 +00:00
|
|
|
std::string out, err;
|
2009-08-26 16:09:06 +00:00
|
|
|
for(std::set<cmCTestRunTest*>::const_iterator i = this->RunningTests.begin();
|
2008-07-03 13:31:33 +00:00
|
|
|
i != this->RunningTests.end(); ++i)
|
|
|
|
{
|
2009-08-26 16:09:06 +00:00
|
|
|
cmCTestRunTest* p = *i;
|
2009-09-11 16:26:41 +00:00
|
|
|
if(!p->CheckOutput())
|
2008-07-03 13:31:33 +00:00
|
|
|
{
|
|
|
|
finished.push_back(p);
|
|
|
|
}
|
|
|
|
}
|
2009-08-26 16:09:06 +00:00
|
|
|
for( std::vector<cmCTestRunTest*>::iterator i = finished.begin();
|
|
|
|
i != finished.end(); ++i)
|
2008-07-03 13:31:33 +00:00
|
|
|
{
|
2009-08-28 15:08:39 +00:00
|
|
|
this->Completed++;
|
2009-08-26 16:09:06 +00:00
|
|
|
cmCTestRunTest* p = *i;
|
|
|
|
int test = p->GetIndex();
|
2009-08-28 15:08:39 +00:00
|
|
|
|
2009-09-03 19:33:44 +00:00
|
|
|
if(p->EndTest(this->Completed, this->Total, true))
|
2009-08-26 16:09:06 +00:00
|
|
|
{
|
2009-08-28 15:08:39 +00:00
|
|
|
this->Passed->push_back(p->GetTestProperties()->Name);
|
2009-08-26 16:09:06 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-08-28 15:08:39 +00:00
|
|
|
this->Failed->push_back(p->GetTestProperties()->Name);
|
2009-08-26 16:09:06 +00:00
|
|
|
}
|
|
|
|
for(TestMap::iterator j = this->Tests.begin();
|
2009-09-04 14:16:06 +00:00
|
|
|
j != this->Tests.end(); ++j)
|
|
|
|
{
|
|
|
|
j->second.erase(test);
|
|
|
|
}
|
2009-08-26 16:09:06 +00:00
|
|
|
this->TestFinishMap[test] = true;
|
|
|
|
this->TestRunningMap[test] = false;
|
|
|
|
this->RunningTests.erase(p);
|
2009-08-27 14:37:30 +00:00
|
|
|
this->WriteCheckpoint(test);
|
2009-09-08 21:10:35 +00:00
|
|
|
this->WriteCostData(test, p->GetTestResults().ExecutionTime);
|
2009-09-07 14:26:17 +00:00
|
|
|
this->RunningCount -= GetProcessorsUsed(test);
|
2009-08-26 16:09:06 +00:00
|
|
|
delete p;
|
2008-07-03 13:31:33 +00:00
|
|
|
}
|
2009-08-26 16:09:06 +00:00
|
|
|
return true;
|
2008-07-03 13:31:33 +00:00
|
|
|
}
|
|
|
|
|
2009-09-08 21:10:35 +00:00
|
|
|
//---------------------------------------------------------
|
|
|
|
void cmCTestMultiProcessHandler::ReadCostData()
|
|
|
|
{
|
|
|
|
std::string fname = this->CTest->GetBinaryDir()
|
|
|
|
+ "/Testing/Temporary/CTestCostData.txt";
|
|
|
|
|
|
|
|
if(cmSystemTools::FileExists(fname.c_str(), true)
|
|
|
|
&& this->ParallelLevel > 1)
|
|
|
|
{
|
|
|
|
std::ifstream fin;
|
|
|
|
fin.open(fname.c_str());
|
|
|
|
std::string line;
|
|
|
|
while(std::getline(fin, line))
|
|
|
|
{
|
|
|
|
std::vector<cmsys::String> parts =
|
|
|
|
cmSystemTools::SplitString(line.c_str(), ' ');
|
|
|
|
|
|
|
|
int index = atoi(parts[0].c_str());
|
|
|
|
float cost = atof(parts[1].c_str());
|
|
|
|
if(this->Properties[index] && this->Properties[index]->Cost == 0)
|
|
|
|
{
|
|
|
|
this->Properties[index]->Cost = cost;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fin.close();
|
|
|
|
}
|
|
|
|
cmSystemTools::RemoveFile(fname.c_str());
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
void cmCTestMultiProcessHandler::CreateTestCostList()
|
|
|
|
{
|
|
|
|
for(TestMap::iterator i = this->Tests.begin();
|
|
|
|
i != this->Tests.end(); ++i)
|
|
|
|
{
|
|
|
|
this->TestCosts[this->Properties[i->first]->Cost].insert(i->first);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
void cmCTestMultiProcessHandler::WriteCostData(int index, float cost)
|
|
|
|
{
|
|
|
|
std::string fname = this->CTest->GetBinaryDir()
|
|
|
|
+ "/Testing/Temporary/CTestCostData.txt";
|
|
|
|
std::fstream fout;
|
|
|
|
fout.open(fname.c_str(), std::ios::app);
|
|
|
|
fout << index << " " << cost << "\n";
|
|
|
|
fout.close();
|
|
|
|
}
|
|
|
|
|
2009-09-08 17:39:13 +00:00
|
|
|
//---------------------------------------------------------
|
2009-08-27 14:37:30 +00:00
|
|
|
void cmCTestMultiProcessHandler::WriteCheckpoint(int index)
|
|
|
|
{
|
|
|
|
std::string fname = this->CTest->GetBinaryDir()
|
|
|
|
+ "/Testing/Temporary/CTestCheckpoint.txt";
|
|
|
|
std::fstream fout;
|
|
|
|
fout.open(fname.c_str(), std::ios::app);
|
|
|
|
fout << index << "\n";
|
|
|
|
fout.close();
|
|
|
|
}
|
|
|
|
|
2009-09-08 21:10:35 +00:00
|
|
|
//---------------------------------------------------------
|
2009-08-27 14:37:30 +00:00
|
|
|
void cmCTestMultiProcessHandler::MarkFinished()
|
|
|
|
{
|
|
|
|
std::string fname = this->CTest->GetBinaryDir()
|
|
|
|
+ "/Testing/Temporary/CTestCheckpoint.txt";
|
|
|
|
cmSystemTools::RemoveFile(fname.c_str());
|
|
|
|
}
|
|
|
|
|
2009-09-08 21:10:35 +00:00
|
|
|
//---------------------------------------------------------
|
2009-08-28 15:08:39 +00:00
|
|
|
//For ShowOnly mode
|
|
|
|
void cmCTestMultiProcessHandler::PrintTestList()
|
2008-07-03 13:31:33 +00:00
|
|
|
{
|
2009-08-28 15:08:39 +00:00
|
|
|
int count = 0;
|
|
|
|
for (PropertiesMap::iterator it = this->Properties.begin();
|
|
|
|
it != this->Properties.end(); it ++ )
|
2008-07-03 13:31:33 +00:00
|
|
|
{
|
2009-08-28 15:08:39 +00:00
|
|
|
count++;
|
|
|
|
cmCTestTestHandler::cmCTestTestProperties& p = *it->second;
|
|
|
|
|
2009-09-11 14:09:48 +00:00
|
|
|
cmCTestRunTest testRun(this->TestHandler);
|
2009-08-28 15:08:39 +00:00
|
|
|
testRun.SetIndex(p.Index);
|
|
|
|
testRun.SetTestProperties(&p);
|
|
|
|
testRun.ComputeArguments(); //logs the command in verbose mode
|
|
|
|
|
2009-08-28 19:08:03 +00:00
|
|
|
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3)
|
2009-08-28 15:08:39 +00:00
|
|
|
<< count << "/");
|
2009-08-28 19:08:03 +00:00
|
|
|
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3)
|
2009-08-28 15:08:39 +00:00
|
|
|
<< this->Total << " ");
|
|
|
|
if (this->TestHandler->MemCheck)
|
|
|
|
{
|
|
|
|
cmCTestLog(this->CTest, HANDLER_OUTPUT, "Memory Check");
|
|
|
|
}
|
|
|
|
else
|
2008-07-03 13:31:33 +00:00
|
|
|
{
|
2009-08-28 15:08:39 +00:00
|
|
|
cmCTestLog(this->CTest, HANDLER_OUTPUT, "Testing");
|
2008-07-03 13:31:33 +00:00
|
|
|
}
|
2009-08-28 15:08:39 +00:00
|
|
|
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
|
|
|
|
cmCTestLog(this->CTest, HANDLER_OUTPUT, p.Name.c_str() << std::endl);
|
2008-07-03 13:31:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-09-08 21:10:35 +00:00
|
|
|
//---------------------------------------------------------
|
2009-08-27 14:37:30 +00:00
|
|
|
void cmCTestMultiProcessHandler::CheckResume()
|
|
|
|
{
|
|
|
|
std::string fname = this->CTest->GetBinaryDir()
|
|
|
|
+ "/Testing/Temporary/CTestCheckpoint.txt";
|
|
|
|
if(this->CTest->GetFailover())
|
|
|
|
{
|
|
|
|
if(cmSystemTools::FileExists(fname.c_str(), true))
|
|
|
|
{
|
|
|
|
*this->TestHandler->LogFile << "Resuming previously interrupted test set"
|
|
|
|
<< std::endl
|
|
|
|
<< "----------------------------------------------------------"
|
|
|
|
<< std::endl;
|
|
|
|
|
|
|
|
std::ifstream fin;
|
|
|
|
fin.open(fname.c_str());
|
|
|
|
std::string line;
|
|
|
|
while(std::getline(fin, line))
|
|
|
|
{
|
|
|
|
int index = atoi(line.c_str());
|
|
|
|
this->RemoveTest(index);
|
|
|
|
}
|
|
|
|
fin.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if(cmSystemTools::FileExists(fname.c_str(), true))
|
|
|
|
{
|
|
|
|
cmSystemTools::RemoveFile(fname.c_str());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-09-08 17:39:13 +00:00
|
|
|
//---------------------------------------------------------
|
2009-08-27 14:37:30 +00:00
|
|
|
void cmCTestMultiProcessHandler::RemoveTest(int index)
|
|
|
|
{
|
2009-09-08 17:39:13 +00:00
|
|
|
this->EraseTest(index);
|
2009-08-27 14:37:30 +00:00
|
|
|
this->Properties.erase(index);
|
|
|
|
this->TestRunningMap[index] = false;
|
|
|
|
this->TestFinishMap[index] = true;
|
2009-08-28 15:08:39 +00:00
|
|
|
this->Completed++;
|
2009-08-27 14:37:30 +00:00
|
|
|
}
|
2009-09-02 14:08:40 +00:00
|
|
|
|
2009-09-08 17:39:13 +00:00
|
|
|
//---------------------------------------------------------
|
2009-09-02 14:08:40 +00:00
|
|
|
int cmCTestMultiProcessHandler::FindMaxIndex()
|
|
|
|
{
|
|
|
|
int max = 0;
|
|
|
|
cmCTestMultiProcessHandler::TestMap::iterator i = this->Tests.begin();
|
|
|
|
for(; i != this->Tests.end(); ++i)
|
|
|
|
{
|
|
|
|
if(i->first > max)
|
|
|
|
{
|
|
|
|
max = i->first;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return max;
|
|
|
|
}
|