diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-04-16 17:36:36 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-04-16 17:36:36 (GMT) |
commit | 4c9c3ac84fb5a72d7f7c7882358abf0ad9c95dd9 (patch) | |
tree | 7c68ed813fe3a339a2b90ff8a160455b926832d8 | |
parent | 62bd5b7c8cb08faf79cc7c70b566e1d953dcd0f6 (diff) | |
download | CMake-4c9c3ac84fb5a72d7f7c7882358abf0ad9c95dd9.zip CMake-4c9c3ac84fb5a72d7f7c7882358abf0ad9c95dd9.tar.gz CMake-4c9c3ac84fb5a72d7f7c7882358abf0ad9c95dd9.tar.bz2 |
ENH: Better reporting of what tests failed and write a file with failed tests
-rw-r--r-- | Source/cmCTest.cxx | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 083bdd1..1ccf48f 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2397,12 +2397,24 @@ int cmCTest::TestDirectory(bool memcheck) if (failed.size()) { + std::ofstream ofs; + std::cerr << "\nThe following tests FAILED:\n"; - for(cmCTest::tm_VectorOfStrings::iterator j = failed.begin(); - j != failed.end(); ++j) - { - std::cerr << "\t" << *j << "\n"; + this->OpenOutputFile("Temporary", "LastTestsFailed.log", ofs); + std::cerr << "\nThe following tests FAILED:\n"; + + std::vector<cmCTest::cmCTestTestResult>::iterator ftit; + for(ftit = m_TestResults.begin(); + ftit != m_TestResults.end(); ++ftit) + { + 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)); + } } + } } |