diff options
| author | MarcoFalke <[email protected]> | 2019-05-28 14:34:50 -0400 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2019-06-20 09:31:07 -0400 |
| commit | fa4a04a5a942d582c62773d815c7e1e9897975d0 (patch) | |
| tree | f7ac6d4ee66ebc3c593081d3a5db64f935850c10 /src/qt/test/test_main.cpp | |
| parent | test: Create data dir in BasicTestingSetup (diff) | |
| download | discoin-fa4a04a5a942d582c62773d815c7e1e9897975d0.tar.xz discoin-fa4a04a5a942d582c62773d815c7e1e9897975d0.zip | |
test: use common setup in gui tests
Diffstat (limited to 'src/qt/test/test_main.cpp')
| -rw-r--r-- | src/qt/test/test_main.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index a2bf53973..9f66c3d3a 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; } |