test: parse the command line arguments in unit tests
Retrieve the command line arguments from boost and pass them to `BasicTestingSetup` so that we gain extra flexibility of passing any config options on the test command line, e.g.: ``` test_bitcoin -- -printtoconsole=1 -checkaddrman=5 ```
This commit is contained in:
7 files changed
+56
-12
No files matched your search
@@ -22,6 +22,7 @@
|
||||
#include <QApplication>
|
||||
#include <QObject>
|
||||
#include <QTest>
|
||||
#include <functional>
|
||||
|
||||
#if defined(QT_STATICPLUGIN)
|
||||
#include <QtPlugin>
|
||||
@@ -43,6 +44,8 @@ using node::NodeContext;
|
||||
|
||||
const std::function<void(const std::string&)> G_TEST_LOG_FUN{};
|
||||
|
||||
const std::function<std::vector<const char*>()> G_TEST_COMMAND_LINE_ARGUMENTS{};
|
||||
|
||||
// This is all you need to run all the tests
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user