COMP: try to fix sgi compiler problem with set and also shorten symbol lengths for set class
This commit is contained in:
parent
112d377fbb
commit
5292b3edef
@ -27,11 +27,11 @@ cmCTestMultiProcessHandler::cmCTestMultiProcessHandler()
|
|||||||
}
|
}
|
||||||
// Set the tests
|
// Set the tests
|
||||||
void
|
void
|
||||||
cmCTestMultiProcessHandler::SetTests(std::map<int, std::set<int> >& tests,
|
cmCTestMultiProcessHandler::SetTests(TestMap& tests,
|
||||||
std::map<int,cmStdString>& testNames)
|
std::map<int,cmStdString>& testNames)
|
||||||
{
|
{
|
||||||
// set test run map to false for all
|
// set test run map to false for all
|
||||||
for(std::map<int, std::set<int> >::iterator i = this->Tests.begin();
|
for(TestMap::iterator i = this->Tests.begin();
|
||||||
i != this->Tests.end(); ++i)
|
i != this->Tests.end(); ++i)
|
||||||
{
|
{
|
||||||
this->TestRunningMap[i->first] = false;
|
this->TestRunningMap[i->first] = false;
|
||||||
@ -118,11 +118,11 @@ bool cmCTestMultiProcessHandler::StartTest(int test)
|
|||||||
// copy the depend tests locally because when
|
// copy the depend tests locally because when
|
||||||
// a test is finished it will be removed from the depend list
|
// 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
|
// and we don't want to be iterating a list while removing from it
|
||||||
std::set<int> depends = this->Tests[test];
|
TestSet depends = this->Tests[test];
|
||||||
size_t totalDepends = depends.size();
|
size_t totalDepends = depends.size();
|
||||||
if(totalDepends)
|
if(totalDepends)
|
||||||
{
|
{
|
||||||
for(std::set<int>::const_iterator i = depends.begin();
|
for(TestSet::const_iterator i = depends.begin();
|
||||||
i != depends.end(); ++i)
|
i != depends.end(); ++i)
|
||||||
{
|
{
|
||||||
// if the test is not already running then start it
|
// if the test is not already running then start it
|
||||||
@ -166,8 +166,8 @@ void cmCTestMultiProcessHandler::StartNextTests()
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::map<int, std::set<int> > tests = this->Tests;
|
TestMap tests = this->Tests;
|
||||||
for(std::map<int, std::set<int> >::iterator i = tests.begin();
|
for(TestMap::iterator i = tests.begin();
|
||||||
i != tests.end(); ++i)
|
i != tests.end(); ++i)
|
||||||
{
|
{
|
||||||
// start test should start only one test
|
// start test should start only one test
|
||||||
@ -254,7 +254,7 @@ void cmCTestMultiProcessHandler::EndTest(cmProcess* p)
|
|||||||
}
|
}
|
||||||
this->TestResults->push_back(cres);
|
this->TestResults->push_back(cres);
|
||||||
// remove test from depend of all other tests
|
// remove test from depend of all other tests
|
||||||
for( std::map<int, std::set<int> >::iterator i = this->Tests.begin();
|
for(TestMap::iterator i = this->Tests.begin();
|
||||||
i!= this->Tests.end(); ++i)
|
i!= this->Tests.end(); ++i)
|
||||||
{
|
{
|
||||||
i->second.erase(test);
|
i->second.erase(test);
|
||||||
@ -271,11 +271,11 @@ void cmCTestMultiProcessHandler::EndTest(cmProcess* p)
|
|||||||
void cmCTestMultiProcessHandler::PrintTests()
|
void cmCTestMultiProcessHandler::PrintTests()
|
||||||
{
|
{
|
||||||
#undef cout
|
#undef cout
|
||||||
for( std::map<int, std::set<int> >::iterator i = this->Tests.begin();
|
for( TestMap::iterator i = this->Tests.begin();
|
||||||
i!= this->Tests.end(); ++i)
|
i!= this->Tests.end(); ++i)
|
||||||
{
|
{
|
||||||
std::cout << "Test " << i->first << " (";
|
std::cout << "Test " << i->first << " (";
|
||||||
for(std::set<int>::iterator j = i->second.begin();
|
for(TestSet::iterator j = i->second.begin();
|
||||||
j != i->second.end(); ++j)
|
j != i->second.end(); ++j)
|
||||||
{
|
{
|
||||||
std::cout << *j << " ";
|
std::cout << *j << " ";
|
||||||
|
@ -33,9 +33,11 @@ class cmProcess;
|
|||||||
class cmCTestMultiProcessHandler
|
class cmCTestMultiProcessHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
struct TestSet : public std::set<int> {};
|
||||||
|
struct TestMap : public std::map<int, TestSet> {};
|
||||||
cmCTestMultiProcessHandler();
|
cmCTestMultiProcessHandler();
|
||||||
// Set the tests
|
// Set the tests
|
||||||
void SetTests(std::map<int, std::set<int> >& tests,
|
void SetTests(TestMap& tests,
|
||||||
std::map<int, cmStdString>& testNames);
|
std::map<int, cmStdString>& testNames);
|
||||||
// Set the max number of tests that can be run at the same time.
|
// Set the max number of tests that can be run at the same time.
|
||||||
void SetParallelLevel(size_t);
|
void SetParallelLevel(size_t);
|
||||||
@ -66,7 +68,7 @@ protected:
|
|||||||
// check all running processes for output and exit case
|
// check all running processes for output and exit case
|
||||||
bool CheckOutput();
|
bool CheckOutput();
|
||||||
// map from test number to set of depend tests
|
// map from test number to set of depend tests
|
||||||
std::map<int, std::set<int> > Tests;
|
TestMap Tests;
|
||||||
std::map<int, cmStdString> TestNames;
|
std::map<int, cmStdString> TestNames;
|
||||||
std::map<int, bool> TestRunningMap;
|
std::map<int, bool> TestRunningMap;
|
||||||
std::map<int, bool> TestFinishMap;
|
std::map<int, bool> TestFinishMap;
|
||||||
|
@ -1237,8 +1237,8 @@ void cmCTestTestHandler::ProcessParallel(std::vector<cmStdString> &passed,
|
|||||||
cmCTestMultiProcessHandler parallel;
|
cmCTestMultiProcessHandler parallel;
|
||||||
parallel.SetCTest(this->CTest);
|
parallel.SetCTest(this->CTest);
|
||||||
parallel.SetParallelLevel(this->CTest->GetParallelLevel());
|
parallel.SetParallelLevel(this->CTest->GetParallelLevel());
|
||||||
std::set<int> depends;
|
cmCTestMultiProcessHandler::TestSet depends;
|
||||||
std::map<int, std::set<int> > tests;
|
cmCTestMultiProcessHandler::TestMap tests;
|
||||||
std::map<int, cmStdString> testnames;
|
std::map<int, cmStdString> testnames;
|
||||||
for (ListOfTests::iterator it = this->TestList.begin();
|
for (ListOfTests::iterator it = this->TestList.begin();
|
||||||
it != this->TestList.end(); it ++ )
|
it != this->TestList.end(); it ++ )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user