From faa1e0fb1712b1f94334e42794163f79988270fd Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 26 Jun 2019 16:42:33 -0400 Subject: qt: test: Create at most one testing setup --- src/qt/test/test_main.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/qt/test/test_main.cpp') 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(); -- cgit v1.2.3