mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
test: Log to debug.log in all tests
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user