1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
Description: Ensure test runner output flushed appropriately.
commit 570: Flush stdout, stderr in progress listener to ensure progress displayed.
commit 576: Flush stdout, stderr in test result destructor to prevent message loss
Upstream change sets 570 and 576.
Author: Baptiste Lepilleur
Applied-Upstream: commit 570 (bug #1649369)
Applied-Upstream: commit 576 (bug #2832029)
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=400867
Last-Update: 2011-12-11
--- cppunit-1.12.1.orig/src/cppunit/TextTestProgressListener.cpp
+++ cppunit-1.12.1/src/cppunit/TextTestProgressListener.cpp
@@ -20,6 +20,7 @@
TextTestProgressListener::startTest( Test *test )
{
stdCOut() << ".";
+ stdCOut().flush();
}
@@ -27,6 +28,7 @@
TextTestProgressListener::addFailure( const TestFailure &failure )
{
stdCOut() << ( failure.isError() ? "E" : "F" );
+ stdCOut().flush();
}
--- cppunit-1.12.1.orig/src/cppunit/TestResult.cpp
+++ cppunit-1.12.1/src/cppunit/TestResult.cpp
@@ -3,6 +3,7 @@
#include <cppunit/TestListener.h>
#include <cppunit/TestResult.h>
#include <cppunit/tools/Algorithm.h>
+#include <cppunit/portability/Stream.h>
#include <algorithm>
#include "DefaultProtector.h"
#include "ProtectorChain.h"
@@ -22,6 +23,8 @@
TestResult::~TestResult()
{
+ stdCOut().flush();
+ stdCErr().flush();
delete m_protectorChain;
}
|