ENH: Using cmListFileCache to read the DartTestfile instead of duplicating the parse loop.
This commit is contained in:
parent
bcfd5ce161
commit
21c5c6c81d
|
@ -1650,21 +1650,17 @@ void cmCTest::ProcessDirectory(std::vector<std::string> &passed,
|
||||||
}
|
}
|
||||||
|
|
||||||
int firstTest = 1;
|
int firstTest = 1;
|
||||||
long line = 0;
|
|
||||||
|
|
||||||
#define SPACE_REGEX "[ \t\r\n]"
|
|
||||||
|
|
||||||
cmsys::RegularExpression ireg(this->m_IncludeRegExp.c_str());
|
cmsys::RegularExpression ireg(this->m_IncludeRegExp.c_str());
|
||||||
cmsys::RegularExpression ereg(this->m_ExcludeRegExp.c_str());
|
cmsys::RegularExpression ereg(this->m_ExcludeRegExp.c_str());
|
||||||
cmsys::RegularExpression dartStuff("(<DartMeasurement.*/DartMeasurement[a-zA-Z]*>)");
|
cmsys::RegularExpression dartStuff("(<DartMeasurement.*/DartMeasurement[a-zA-Z]*>)");
|
||||||
|
|
||||||
bool parseError;
|
cmListFileCache cache;
|
||||||
while ( fin )
|
cmListFile* listFile = cache.GetFileCache("DartTestfile.txt", false);
|
||||||
{
|
for(std::vector<cmListFileFunction>::const_iterator f =
|
||||||
cmListFileFunction lff;
|
listFile->m_Functions.begin(); f != listFile->m_Functions.end(); ++f)
|
||||||
if(cmListFileCache::ParseFunction(fin, lff, "DartTestfile.txt",
|
|
||||||
parseError, line))
|
|
||||||
{
|
{
|
||||||
|
const cmListFileFunction& lff = *f;
|
||||||
const std::string& name = lff.m_Name;
|
const std::string& name = lff.m_Name;
|
||||||
const std::vector<cmListFileArgument>& args = lff.m_Arguments;
|
const std::vector<cmListFileArgument>& args = lff.m_Arguments;
|
||||||
if (name == "SUBDIRS")
|
if (name == "SUBDIRS")
|
||||||
|
@ -1851,7 +1847,6 @@ void cmCTest::ProcessDirectory(std::vector<std::string> &passed,
|
||||||
m_TestResults.push_back( cres );
|
m_TestResults.push_back( cres );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int cmCTest::TestDirectory()
|
int cmCTest::TestDirectory()
|
||||||
|
@ -2193,6 +2188,8 @@ std::string cmCTest::GetTestModelString()
|
||||||
return "Experimental";
|
return "Experimental";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define SPACE_REGEX "[ \t\r\n]"
|
||||||
|
|
||||||
std::string cmCTest::GenerateRegressionImages(const std::string& xml)
|
std::string cmCTest::GenerateRegressionImages(const std::string& xml)
|
||||||
{
|
{
|
||||||
cmsys::RegularExpression twoattributes(
|
cmsys::RegularExpression twoattributes(
|
||||||
|
|
Loading…
Reference in New Issue