Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

adds flushes to the output stream of teamcity reporter, making the test output more responsive.

Commit
c1a91caf004be65b3e6c68376b552a38742aa43e
Author
Sebastian Grottel ·
Committer
Martin Hořeňovský
Parents
96c5de678d53

Files · Download .tar.gz

Changes

 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: