ENH: Skip tests that do not have defects
This commit is contained in:
parent
575afc8b14
commit
787ca6457b
|
@ -2457,7 +2457,6 @@ int cmCTest::TestDirectory(bool memcheck)
|
||||||
|
|
||||||
std::cerr << "\nThe following tests FAILED:\n";
|
std::cerr << "\nThe following tests FAILED:\n";
|
||||||
this->OpenOutputFile("Temporary", "LastTestsFailed.log", ofs);
|
this->OpenOutputFile("Temporary", "LastTestsFailed.log", ofs);
|
||||||
std::cerr << "\nThe following tests FAILED:\n";
|
|
||||||
|
|
||||||
std::vector<cmCTest::cmCTestTestResult>::iterator ftit;
|
std::vector<cmCTest::cmCTestTestResult>::iterator ftit;
|
||||||
for(ftit = m_TestResults.begin();
|
for(ftit = m_TestResults.begin();
|
||||||
|
@ -2724,7 +2723,11 @@ void cmCTest::GenerateDartMemCheckOutput(std::ostream& os)
|
||||||
std::string memcheckstr;
|
std::string memcheckstr;
|
||||||
int memcheckresults[cmCTest::NO_MEMORY_FAULT];
|
int memcheckresults[cmCTest::NO_MEMORY_FAULT];
|
||||||
int kk;
|
int kk;
|
||||||
this->ProcessMemCheckOutput(result->m_Output, memcheckstr, memcheckresults);
|
bool res = this->ProcessMemCheckOutput(result->m_Output, memcheckstr, memcheckresults);
|
||||||
|
if ( res && result->m_Status == cmCTest::COMPLETED )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
os << "\t<Test Status=\"";
|
os << "\t<Test Status=\"";
|
||||||
if ( result->m_Status == cmCTest::COMPLETED )
|
if ( result->m_Status == cmCTest::COMPLETED )
|
||||||
{
|
{
|
||||||
|
@ -3783,6 +3786,8 @@ bool cmCTest::ProcessMemCheckPurifyOutput(const std::string&, std::string& log,
|
||||||
|
|
||||||
cmsys::RegularExpression pfW("^\\[[WEI]\\] ([A-Z][A-Z][A-Z][A-Z]*): ");
|
cmsys::RegularExpression pfW("^\\[[WEI]\\] ([A-Z][A-Z][A-Z][A-Z]*): ");
|
||||||
|
|
||||||
|
int defects = 0;
|
||||||
|
|
||||||
std::string line;
|
std::string line;
|
||||||
while ( cmSystemTools::GetLineFromStream(ifs, line) )
|
while ( cmSystemTools::GetLineFromStream(ifs, line) )
|
||||||
{
|
{
|
||||||
|
@ -3808,11 +3813,16 @@ bool cmCTest::ProcessMemCheckPurifyOutput(const std::string&, std::string& log,
|
||||||
{
|
{
|
||||||
ostr << "<b>" << cmCTestMemCheckResultStrings[failure] << "</b> ";
|
ostr << "<b>" << cmCTestMemCheckResultStrings[failure] << "</b> ";
|
||||||
results[failure] ++;
|
results[failure] ++;
|
||||||
|
defects ++;
|
||||||
}
|
}
|
||||||
ostr << cmCTest::MakeXMLSafe(line) << std::endl;
|
ostr << cmCTest::MakeXMLSafe(line) << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
log = ostr.str();
|
log = ostr.str();
|
||||||
|
if ( defects )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3827,6 +3837,8 @@ bool cmCTest::ProcessMemCheckValgrindOutput(const std::string& str, std::string&
|
||||||
cmOStringStream ostr;
|
cmOStringStream ostr;
|
||||||
log = "";
|
log = "";
|
||||||
|
|
||||||
|
int defects = 0;
|
||||||
|
|
||||||
cmsys::RegularExpression valgrindLine("^==[0-9][0-9]*==");
|
cmsys::RegularExpression valgrindLine("^==[0-9][0-9]*==");
|
||||||
|
|
||||||
cmsys::RegularExpression vgFIM(
|
cmsys::RegularExpression vgFIM(
|
||||||
|
@ -3877,12 +3889,17 @@ bool cmCTest::ProcessMemCheckValgrindOutput(const std::string& str, std::string&
|
||||||
{
|
{
|
||||||
ostr << "<b>" << cmCTestMemCheckResultStrings[failure] << "</b> ";
|
ostr << "<b>" << cmCTestMemCheckResultStrings[failure] << "</b> ";
|
||||||
results[failure] ++;
|
results[failure] ++;
|
||||||
|
defects ++;
|
||||||
}
|
}
|
||||||
ostr << cmCTest::MakeXMLSafe(lines[cc]) << std::endl;
|
ostr << cmCTest::MakeXMLSafe(lines[cc]) << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//std::cout << "End test (elapsed: " << (cmSystemTools::GetTime() - sttime) << std::endl;
|
//std::cout << "End test (elapsed: " << (cmSystemTools::GetTime() - sttime) << std::endl;
|
||||||
log = ostr.str();
|
log = ostr.str();
|
||||||
|
if ( defects )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue