From c9d9699ca8733fc4646a0df5a046eee54681eaf1 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 81a5dee9..af3505bd 100644 --- a/include/reporters/catch_reporter_teamcity.hpp +++ b/include/reporters/catch_reporter_teamcity.hpp @@ -141,6 +141,7 @@ namespace Catch { << "]\n"; } } + stream.flush(); return true; } @@ -154,6 +155,7 @@ namespace Catch { StreamingReporterBase::testCaseStarting( testInfo ); stream << "##teamcity[testStarted name='" << escape( testInfo.name ) << "']\n"; + stream.flush(); } virtual void testCaseEnded( TestCaseStats const& testCaseStats ) CATCH_OVERRIDE { @@ -169,6 +171,7 @@ namespace Catch { stream << "##teamcity[testFinished name='" << escape( testCaseStats.testInfo.name ) << "' duration='" << m_testTimer.getElapsedMilliseconds() << "']\n"; + stream.flush(); } private: