summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-03-01 22:37:04 +0000
committerChris Wilson <chris+github@qwirx.com>2008-03-01 22:37:04 +0000
commitedf149ca9d5a819ee63863f909b7fa01c54fb39e (patch)
tree1adf9a2609c624c9a6f922f521db21a5609bc3da
parentd97eb3f187d6a39942ae988b2a1c6de8b2a10785 (diff)
Flush standard output when finishing test, useful on Windows where it
happens rarely and test output can end up below the PASSED line and confuse the runtest script.
-rw-r--r--infrastructure/buildenv-testmain-template.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/infrastructure/buildenv-testmain-template.cpp b/infrastructure/buildenv-testmain-template.cpp
index ff10a794..f8edd3a7 100644
--- a/infrastructure/buildenv-testmain-template.cpp
+++ b/infrastructure/buildenv-testmain-template.cpp
@@ -310,6 +310,9 @@ int main(int argc, char * const * argv)
Timers::Init();
int returncode = test(argc, (const char **)argv);
Timers::Cleanup();
+
+ fflush(stdout);
+ fflush(stderr);
// check for memory leaks, if enabled
#ifdef BOX_MEMORY_LEAK_TESTING
@@ -326,6 +329,10 @@ int main(int argc, char * const * argv)
if(fulltestmode)
{
bool filesleftopen = checkfilesleftopen();
+
+ fflush(stdout);
+ fflush(stderr);
+
if(filesleftopen)
{
failures++;