5#include <bitcoin-build-config.h>
23#include <QApplication>
38int main(
int argc,
char* argv[])
46 fs::create_directories([] {
48 return gArgs.GetDataDirNet() /
"blocks";
52 gArgs.ForceSetArg(
"-listen",
"0");
53 gArgs.ForceSetArg(
"-listenonion",
"0");
54 gArgs.ForceSetArg(
"-discover",
"0");
55 gArgs.ForceSetArg(
"-dnsseed",
"0");
56 gArgs.ForceSetArg(
"-fixedseeds",
"0");
57 gArgs.ForceSetArg(
"-natpmp",
"0");
60 if (!
gArgs.ReadConfigFiles(error,
true)) qWarning() << error.c_str();
66 if (getenv(
"QT_QPA_PLATFORM") ==
nullptr) _putenv_s(
"QT_QPA_PLATFORM",
"minimal");
68 setenv(
"QT_QPA_PLATFORM",
"minimal", 0 );
75 int num_test_failures{0};
82 num_test_failures += QTest::qExec(&app_tests);
85 num_test_failures += QTest::qExec(&options_tests);
88 num_test_failures += QTest::qExec(&
test1);
91 num_test_failures += QTest::qExec(&test3);
95 num_test_failures += QTest::qExec(&test5);
98 num_test_failures += QTest::qExec(&test6);
101 if (num_test_failures) {
102 qWarning(
"\nFailed tests: %d\n", num_test_failures);
104 qDebug(
"\nAll tests passed.\n");
111 return num_test_failures;
const std::function< void(const std::string &)> G_TEST_LOG_FUN
This is connected to the logger.
const std::function< std::vector< const char * >()> G_TEST_COMMAND_LINE_ARGUMENTS
Retrieve the command line arguments.
const std::function< std::string()> G_TEST_GET_FULL_NAME
Retrieve the unit test name.
Main Bitcoin application object.
interfaces::Node & node() const
void createNode(interfaces::Init &init)
Create or spawn node.
#define QAPP_APP_NAME_DEFAULT
std::unique_ptr< Init > MakeGuiInit(int argc, char *argv[])
Return implementation of Init interface for the gui process.