diff options
Diffstat (limited to 'src/qt/test')
-rw-r--r-- | src/qt/test/apptests.cpp | 4 | ||||
-rw-r--r-- | src/qt/test/rpcnestedtests.cpp | 1 | ||||
-rw-r--r-- | src/qt/test/test_main.cpp | 14 |
3 files changed, 8 insertions, 11 deletions
diff --git a/src/qt/test/apptests.cpp b/src/qt/test/apptests.cpp index b9bf933ee5..22e49b06cb 100644 --- a/src/qt/test/apptests.cpp +++ b/src/qt/test/apptests.cpp @@ -5,6 +5,7 @@ #include <qt/test/apptests.h> #include <chainparams.h> +#include <key.h> #include <qt/bitcoin.h> #include <qt/bitcoingui.h> #include <qt/networkstyle.h> @@ -62,6 +63,9 @@ void AppTests::appTests() } #endif + ECC_Stop(); // Already started by the common test setup, so stop it to avoid interference + LogInstance().DisconnectTestLogger(); + m_app.parameterSetup(); m_app.createOptionsModel(true /* reset settings */); QScopedPointer<const NetworkStyle> style( diff --git a/src/qt/test/rpcnestedtests.cpp b/src/qt/test/rpcnestedtests.cpp index 7a10ada438..86e5632e2c 100644 --- a/src/qt/test/rpcnestedtests.cpp +++ b/src/qt/test/rpcnestedtests.cpp @@ -35,6 +35,7 @@ void RPCNestedTests::rpcNestedTests() tableRPC.appendCommand("rpcNestedTest", &vRPCCommands[0]); //mempool.setSanityCheck(1.0); + LogInstance().DisconnectTestLogger(); // Already started by the common test setup, so stop it to avoid interference TestingSetup test; if (RPCIsInWarmup(nullptr)) SetRPCWarmupFinished(); diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index a2bf53973b..9f66c3d3a9 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -11,9 +11,9 @@ #include <qt/bitcoin.h> #include <qt/test/apptests.h> #include <qt/test/rpcnestedtests.h> -#include <util/system.h> #include <qt/test/uritests.h> #include <qt/test/compattests.h> +#include <test/setup_common.h> #ifdef ENABLE_WALLET #include <qt/test/addressbooktests.h> @@ -48,14 +48,8 @@ extern void noui_connect(); // This is all you need to run all the tests int main(int argc, char *argv[]) { - SetupEnvironment(); - SetupNetworking(); - SelectParams(CBaseChainParams::REGTEST); - noui_connect(); - ClearDatadirCache(); - fs::path pathTemp = fs::temp_directory_path() / strprintf("test_bitcoin-qt_%lu_%i", (unsigned long)GetTime(), (int)GetRand(100000)); - fs::create_directories(pathTemp); - gArgs.ForceSetArg("-datadir", pathTemp.string()); + BasicTestingSetup test{CBaseChainParams::REGTEST}; + auto node = interfaces::MakeNode(); bool fInvalid = false; @@ -109,7 +103,5 @@ int main(int argc, char *argv[]) } #endif - fs::remove_all(pathTemp); - return fInvalid; } |