ENH: Better reporting of what tests failed and write a file with failed tests
This commit is contained in:
parent
62bd5b7c8c
commit
4c9c3ac84f
|
@ -2397,13 +2397,25 @@ int cmCTest::TestDirectory(bool memcheck)
|
||||||
|
|
||||||
if (failed.size())
|
if (failed.size())
|
||||||
{
|
{
|
||||||
|
std::ofstream ofs;
|
||||||
|
|
||||||
std::cerr << "\nThe following tests FAILED:\n";
|
std::cerr << "\nThe following tests FAILED:\n";
|
||||||
for(cmCTest::tm_VectorOfStrings::iterator j = failed.begin();
|
this->OpenOutputFile("Temporary", "LastTestsFailed.log", ofs);
|
||||||
j != failed.end(); ++j)
|
std::cerr << "\nThe following tests FAILED:\n";
|
||||||
|
|
||||||
|
std::vector<cmCTest::cmCTestTestResult>::iterator ftit;
|
||||||
|
for(ftit = m_TestResults.begin();
|
||||||
|
ftit != m_TestResults.end(); ++ftit)
|
||||||
{
|
{
|
||||||
std::cerr << "\t" << *j << "\n";
|
if ( ftit->m_Status != cmCTest::COMPLETED )
|
||||||
|
{
|
||||||
|
ofs << ftit->m_TestCount << ":" << ftit->m_Name << std::endl;
|
||||||
|
fprintf(stderr, "\t%3d - %s (%s)\n", ftit->m_TestCount, ftit->m_Name.c_str(),
|
||||||
|
this->GetTestStatus(ftit->m_Status));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_DartMode )
|
if ( m_DartMode )
|
||||||
|
|
Loading…
Reference in New Issue