Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/test_main.cpp
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | int main(int argc, char *argv[]) { | ||||
// Initialize persistent globals with the testing setup state for sanity. | // Initialize persistent globals with the testing setup state for sanity. | ||||
// E.g. -datadir in gArgs is set to a temp directory dummy value (instead | // 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 | // of defaulting to the default datadir), or globalChainParams is set to | ||||
// regtest params. | // regtest params. | ||||
// | // | ||||
// All tests must use their own testing setup (if needed). | // All tests must use their own testing setup (if needed). | ||||
{ BasicTestingSetup dummy{CBaseChainParams::REGTEST}; } | { BasicTestingSetup dummy{CBaseChainParams::REGTEST}; } | ||||
std::unique_ptr<interfaces::Node> node = interfaces::MakeNode(); | NodeContext node_context; | ||||
std::unique_ptr<interfaces::Node> node = | |||||
interfaces::MakeNode(&node_context); | |||||
bool fInvalid = false; | bool fInvalid = false; | ||||
// Prefer the "minimal" platform for the test instead of the normal default | // Prefer the "minimal" platform for the test instead of the normal default | ||||
// platform ("xcb", "windows", or "cocoa") so tests can't unintentionally | // platform ("xcb", "windows", or "cocoa") so tests can't unintentionally | ||||
// interfere with any background GUIs and don't require extra resources. | // interfere with any background GUIs and don't require extra resources. | ||||
setenv("QT_QPA_PLATFORM", "minimal", /* overwrite */ 0); | setenv("QT_QPA_PLATFORM", "minimal", /* overwrite */ 0); | ||||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |