teamcity reporter should time durations explicitly

This commit is contained in:
Alex Glyde 2017-03-06 10:35:03 -05:00
parent e95bf48445
commit 3afd077b55

View File

@ -148,6 +148,7 @@ namespace Catch {
}
virtual void testCaseStarting( TestCaseInfo const& testInfo ) CATCH_OVERRIDE {
testTimer.start();
StreamingReporterBase::testCaseStarting( testInfo );
stream << "##teamcity[testStarted name='"
<< escape( testInfo.name ) << "']\n";
@ -164,7 +165,8 @@ namespace Catch {
<< escape( testCaseStats.testInfo.name )
<< "' out='" << escape( testCaseStats.stdErr ) << "']\n";
stream << "##teamcity[testFinished name='"
<< escape( testCaseStats.testInfo.name ) << "']\n";
<< escape( testCaseStats.testInfo.name ) << "' duration='"
<< testTimer.getElapsedMilliseconds() << "']\n";
}
private:
@ -203,7 +205,7 @@ namespace Catch {
}
private:
bool m_headerPrintedForThisSection;
Timer testTimer;
};
#ifdef CATCH_IMPL