diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 478e32e2d..97527553c 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -783,7 +783,9 @@ void cmCTestTestHandler::ProcessDirectory(std::vector &passed, } } - if (res == cmsysProcess_State_Exited && retVal == 0 && !forceFail) + if (res == cmsysProcess_State_Exited && + (retVal == 0 || it->m_RequiredRegularExpressions.size()) && + !forceFail) { cmCTestLog(m_CTest, HANDLER_OUTPUT, " Passed"); if ( it->m_WillFail )