ENH: Properly report failed tests
This commit is contained in:
parent
8607e8008b
commit
0d824e1d1a
|
@ -748,10 +748,10 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed,
|
||||||
|
|
||||||
if ( !m_CTest->GetShowOnly() )
|
if ( !m_CTest->GetShowOnly() )
|
||||||
{
|
{
|
||||||
|
bool testFailed = false;
|
||||||
if (res == cmsysProcess_State_Exited && retVal == 0)
|
if (res == cmsysProcess_State_Exited && retVal == 0)
|
||||||
{
|
{
|
||||||
cmCTestLog(m_CTest, HANDLER_OUTPUT, " Passed");
|
cmCTestLog(m_CTest, HANDLER_OUTPUT, " Passed");
|
||||||
passed.push_back(testname);
|
|
||||||
if ( it->m_WillFail )
|
if ( it->m_WillFail )
|
||||||
{
|
{
|
||||||
cmCTestLog(m_CTest, HANDLER_OUTPUT, " - But it should fail!");
|
cmCTestLog(m_CTest, HANDLER_OUTPUT, " - But it should fail!");
|
||||||
|
@ -765,6 +765,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
testFailed = true;
|
||||||
cres.m_Status = cmCTestTestHandler::FAILED;
|
cres.m_Status = cmCTestTestHandler::FAILED;
|
||||||
if ( res == cmsysProcess_State_Expired )
|
if ( res == cmsysProcess_State_Expired )
|
||||||
{
|
{
|
||||||
|
@ -810,11 +811,19 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed,
|
||||||
{
|
{
|
||||||
cres.m_Status = cmCTestTestHandler::COMPLETED;
|
cres.m_Status = cmCTestTestHandler::COMPLETED;
|
||||||
cmCTestLog(m_CTest, HANDLER_OUTPUT, " - supposed to fail");
|
cmCTestLog(m_CTest, HANDLER_OUTPUT, " - supposed to fail");
|
||||||
|
testFailed = false;
|
||||||
}
|
}
|
||||||
cmCTestLog(m_CTest, HANDLER_OUTPUT, std::endl);
|
cmCTestLog(m_CTest, HANDLER_OUTPUT, std::endl);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if ( testFailed )
|
||||||
|
{
|
||||||
failed.push_back(testname);
|
failed.push_back(testname);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
passed.push_back(testname);
|
||||||
|
}
|
||||||
if (!output.empty() && output.find("<DartMeasurement") != output.npos)
|
if (!output.empty() && output.find("<DartMeasurement") != output.npos)
|
||||||
{
|
{
|
||||||
if (m_DartStuff.find(output.c_str()))
|
if (m_DartStuff.find(output.c_str()))
|
||||||
|
|
Loading…
Reference in New Issue