diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-06-20 09:34:45 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-06-20 12:12:24 -0400 |
commit | fabc57e07dc34c103552cb51c9277bb48ef97739 (patch) | |
tree | 34b541df706817511b175e3a75e3060d593d99a5 /src/test/setup_common.cpp | |
parent | fa4a04a5a942d582c62773d815c7e1e9897975d0 (diff) |
test: Log to debug.log in all tests
Diffstat (limited to 'src/test/setup_common.cpp')
-rw-r--r-- | src/test/setup_common.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/setup_common.cpp b/src/test/setup_common.cpp index fe98a1ceac..aaf69b9575 100644 --- a/src/test/setup_common.cpp +++ b/src/test/setup_common.cpp @@ -10,6 +10,7 @@ #include <consensus/params.h> #include <consensus/validation.h> #include <crypto/sha256.h> +#include <init.h> #include <miner.h> #include <net_processing.h> #include <noui.h> @@ -37,6 +38,10 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName) fs::create_directories(m_path_root); gArgs.ForceSetArg("-datadir", m_path_root.string()); ClearDatadirCache(); + SelectParams(chainName); + gArgs.ForceSetArg("-printtoconsole", "0"); + InitLogging(); + LogInstance().StartLogging(); SHA256AutoDetect(); ECC_Start(); SetupEnvironment(); @@ -44,7 +49,6 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName) InitSignatureCache(); InitScriptExecutionCache(); fCheckBlockIndex = true; - SelectParams(chainName); static bool noui_connected = false; if (!noui_connected) { noui_connect(); @@ -54,6 +58,7 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName) BasicTestingSetup::~BasicTestingSetup() { + LogInstance().DisconnectTestLogger(); fs::remove_all(m_path_root); ECC_Stop(); } |