diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-06-26 16:42:33 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-06-27 16:47:23 -0400 |
commit | faa1e0fb1712b1f94334e42794163f79988270fd (patch) | |
tree | 8e7200434658e06054579bffceacb3fda096d1f4 /src/qt/test/test_main.cpp | |
parent | 7400135b7918df9c34206bead744c496e07b0e78 (diff) |
qt: test: Create at most one testing setup
Diffstat (limited to 'src/qt/test/test_main.cpp')
-rw-r--r-- | src/qt/test/test_main.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index 79d88ab742..6bda8dc6eb 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -42,12 +42,18 @@ Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin); #endif #endif -extern void noui_connect(); - // This is all you need to run all the tests int main(int argc, char *argv[]) { - BasicTestingSetup test{CBaseChainParams::REGTEST}; + // Initialize persistent globals with the testing setup state for sanity. + // E.g. -datadir in gArgs is set to a temp directory dummy value (instead + // of defaulting to the default datadir), or globalChainParams is set to + // regtest params. + // + // All tests must use their own testing setup (if needed). + { + BasicTestingSetup dummy{CBaseChainParams::REGTEST}; + } auto node = interfaces::MakeNode(); |