Changeset View
Changeset View
Standalone View
Standalone View
src/test/test_bitcoin_main.cpp
Show All 22 Lines | |||||
[[noreturn]] void StartShutdown() { | [[noreturn]] void StartShutdown() { | ||||
std::exit(EXIT_SUCCESS); | std::exit(EXIT_SUCCESS); | ||||
} | } | ||||
bool ShutdownRequested() { | bool ShutdownRequested() { | ||||
return false; | return false; | ||||
} | } | ||||
int main(int argc, char *argv[]) { | |||||
// Additional CLI params supported by test_bitcoin: | |||||
std::set<std::string> testArgs = { | std::set<std::string> testArgs = { | ||||
"-gravitonactivationtime", | |||||
"-phononactivationtime", | "-phononactivationtime", | ||||
}; | }; | ||||
int main(int argc, char *argv[]) { | |||||
// Additional CLI params supported by test_bitcoin: | |||||
// Note: gArgs.ParseParameters() cannot be called here or it will fail to | // Note: gArgs.ParseParameters() cannot be called here or it will fail to | ||||
// parse BOOST runtime params. | // parse BOOST runtime params. | ||||
for (int i = 1; i < argc; i++) { | for (int i = 1; i < argc; i++) { | ||||
std::string key(argv[i]); | std::string key(argv[i]); | ||||
std::string value; | std::string value; | ||||
if (ParseKeyValue(key, value)) { | if (ParseKeyValue(key, value)) { | ||||
if (testArgs.count(key) > 0) { | if (testArgs.count(key) > 0) { | ||||
gArgs.ForceSetArg(key, value); | gArgs.ForceSetArg(key, value); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
return boost::unit_test::unit_test_main(&init_unit_test, argc, argv); | return boost::unit_test::unit_test_main(&init_unit_test, argc, argv); | ||||
} | } |