changeset 3323:7be8b786c900 draft

Suppress output when running unit tests. This does two things: 1) Now does not output to debug.log if -printtodebugger flag is passed 2) Unit tests set -printtodebugger so only test results are output to stdout Note that -printtodebugger only actually prints to the debugger on Windows.
author Gavin Andresen <gavinandresen@gmail.com>
date Mon, 20 Aug 2012 11:33:20 -0400
parents f662dd42eefc
children f25c04d61768
files src/test/test_bitcoin.cpp src/util.cpp
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -13,7 +13,7 @@
 
 struct TestingSetup {
     TestingSetup() {
-        fPrintToConsole = true; // don't want to write to debug.log file
+        fPrintToDebugger = true; // don't want to write to debug.log file
         noui_connect();
         bitdb.MakeMock();
         LoadBlockIndex(true);
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -204,7 +204,7 @@
         ret = vprintf(pszFormat, arg_ptr);
         va_end(arg_ptr);
     }
-    else
+    else if (!fPrintToDebugger)
     {
         // print to debug.log
         static FILE* fileout = NULL;