mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
teamcity reporter should time durations explicitly
This commit is contained in:
parent
e95bf48445
commit
3afd077b55
@ -148,6 +148,7 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void testCaseStarting( TestCaseInfo const& testInfo ) CATCH_OVERRIDE {
|
virtual void testCaseStarting( TestCaseInfo const& testInfo ) CATCH_OVERRIDE {
|
||||||
|
testTimer.start();
|
||||||
StreamingReporterBase::testCaseStarting( testInfo );
|
StreamingReporterBase::testCaseStarting( testInfo );
|
||||||
stream << "##teamcity[testStarted name='"
|
stream << "##teamcity[testStarted name='"
|
||||||
<< escape( testInfo.name ) << "']\n";
|
<< escape( testInfo.name ) << "']\n";
|
||||||
@ -164,7 +165,8 @@ namespace Catch {
|
|||||||
<< escape( testCaseStats.testInfo.name )
|
<< escape( testCaseStats.testInfo.name )
|
||||||
<< "' out='" << escape( testCaseStats.stdErr ) << "']\n";
|
<< "' out='" << escape( testCaseStats.stdErr ) << "']\n";
|
||||||
stream << "##teamcity[testFinished name='"
|
stream << "##teamcity[testFinished name='"
|
||||||
<< escape( testCaseStats.testInfo.name ) << "']\n";
|
<< escape( testCaseStats.testInfo.name ) << "' duration='"
|
||||||
|
<< testTimer.getElapsedMilliseconds() << "']\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -203,7 +205,7 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
bool m_headerPrintedForThisSection;
|
bool m_headerPrintedForThisSection;
|
||||||
|
Timer testTimer;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CATCH_IMPL
|
#ifdef CATCH_IMPL
|
||||||
|
Loading…
Reference in New Issue
Block a user