From c1a91caf004be65b3e6c68376b552a38742aa43e Mon Sep 17 00:00:00 2001 From: Sebastian Grottel Date: Mon, 16 Oct 2017 08:55:51 +0200 Subject: [PATCH] adds flushes to the output stream of teamcity reporter, making the test output more responsive. --- include/reporters/catch_reporter_teamcity.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/reporters/catch_reporter_teamcity.hpp b/include/reporters/catch_reporter_teamcity.hpp index d17026a8..6c7b3d18 100644 --- a/include/reporters/catch_reporter_teamcity.hpp +++ b/include/reporters/catch_reporter_teamcity.hpp @@ -133,6 +133,7 @@ namespace Catch { << "]\n"; } } + stream.flush(); return true; } @@ -146,6 +147,7 @@ namespace Catch { StreamingReporterBase::testCaseStarting( testInfo ); stream << "##teamcity[testStarted name='" << escape( testInfo.name ) << "']\n"; + stream.flush(); } void testCaseEnded( TestCaseStats const& testCaseStats ) override { @@ -161,6 +163,7 @@ namespace Catch { stream << "##teamcity[testFinished name='" << escape( testCaseStats.testInfo.name ) << "' duration='" << m_testTimer.getElapsedMilliseconds() << "']\n"; + stream.flush(); } private: