Modified team city reporter to report testIgnored if it was skipped, eg due to the [mayfail] tag

This commit is contained in:
Peter Nemere 2016-06-06 14:32:07 +10:00
parent f666f5f0ae
commit ede3dd13fa
1 changed files with 11 additions and 0 deletions

View File

@ -134,10 +134,21 @@ namespace Catch {
" " << result.getExpandedExpression() << "\n";
}
// If we're allowing this to fail, report it as an ignored test in team city
if (currentTestCaseInfo->okToFail())
{
stream << "##teamcity[testIgnored"
<< " name='" << escape(currentTestCaseInfo->name) << "'"
<< " message='" << escape(std::string("[FailedButIgnored] ") + msg.str()) << "'"
<< "]\n";
}
else
{
stream << "##teamcity[testFailed"
<< " name='" << escape( currentTestCaseInfo->name )<< "'"
<< " message='" << escape( msg.str() ) << "'"
<< "]\n";
}
}
return true;
}