summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-09-20 19:08:41 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-09-20 19:08:41 (GMT)
commit0d824e1d1ad2166a47c27094990cd944dd664f6a (patch)
tree20e46cb21b2ebe2209cb952d78f737af7550295a
parent8607e8008bf3ec037bb7060a9dc5e229e02b8428 (diff)
downloadCMake-0d824e1d1ad2166a47c27094990cd944dd664f6a.zip
CMake-0d824e1d1ad2166a47c27094990cd944dd664f6a.tar.gz
CMake-0d824e1d1ad2166a47c27094990cd944dd664f6a.tar.bz2
ENH: Properly report failed tests
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 864be55..bede089 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -748,10 +748,10 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed,
if ( !m_CTest->GetShowOnly() )
{
+ bool testFailed = false;
if (res == cmsysProcess_State_Exited && retVal == 0)
{
cmCTestLog(m_CTest, HANDLER_OUTPUT, " Passed");
- passed.push_back(testname);
if ( it->m_WillFail )
{
cmCTestLog(m_CTest, HANDLER_OUTPUT, " - But it should fail!");
@@ -765,6 +765,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed,
}
else
{
+ testFailed = true;
cres.m_Status = cmCTestTestHandler::FAILED;
if ( res == cmsysProcess_State_Expired )
{
@@ -810,11 +811,19 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed,
{
cres.m_Status = cmCTestTestHandler::COMPLETED;
cmCTestLog(m_CTest, HANDLER_OUTPUT, " - supposed to fail");
+ testFailed = false;
}
cmCTestLog(m_CTest, HANDLER_OUTPUT, std::endl);
}
+ }
+ if ( testFailed )
+ {
failed.push_back(testname);
}
+ else
+ {
+ passed.push_back(testname);
+ }
if (!output.empty() && output.find("<DartMeasurement") != output.npos)
{
if (m_DartStuff.find(output.c_str()))