5 #if defined(HAVE_CONFIG_H)
23 #include <QApplication>
30 #if defined(QT_STATICPLUGIN)
32 #if defined(QT_QPA_PLATFORM_MINIMAL)
33 Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin);
35 #if defined(QT_QPA_PLATFORM_XCB)
36 Q_IMPORT_PLUGIN(QXcbIntegrationPlugin);
37 #elif defined(QT_QPA_PLATFORM_WINDOWS)
38 Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
39 #elif defined(QT_QPA_PLATFORM_COCOA)
40 Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
41 #elif defined(QT_QPA_PLATFORM_ANDROID)
42 Q_IMPORT_PLUGIN(QAndroidPlatformIntegrationPlugin)
51 int main(
int argc,
char* argv[])
77 if (getenv(
"QT_QPA_PLATFORM") ==
nullptr) _putenv_s(
"QT_QPA_PLATFORM",
"minimal");
79 setenv(
"QT_QPA_PLATFORM",
"minimal", 0 );
83 app.setApplicationName(
"Bitcoin-Qt-test");
86 int num_test_failures{0};
89 num_test_failures += QTest::qExec(&app_tests);
92 num_test_failures += QTest::qExec(&options_tests);
95 num_test_failures += QTest::qExec(&
test1);
98 num_test_failures += QTest::qExec(&test3);
102 num_test_failures += QTest::qExec(&test5);
105 num_test_failures += QTest::qExec(&test6);
108 if (num_test_failures) {
109 qWarning(
"\nFailed tests: %d\n", num_test_failures);
111 qDebug(
"\nAll tests passed.\n");
113 return num_test_failures;
void ForceSetArg(const std::string &strArg, const std::string &strValue)
const fs::path & GetDataDirNet() const
Get data directory path with appended network identifier.
Main Bitcoin application object.
void createNode(interfaces::Init &init)
Create or spawn node.
interfaces::Node & node() const
static const std::string REGTEST
static bool create_directories(const std::filesystem::path &p)
Create directory (and if necessary its parents), unless the leaf directory already exists or is a sym...
std::unique_ptr< Init > MakeGuiInit(int argc, char *argv[])
Return implementation of Init interface for the gui process.
int main(int argc, char *argv[])
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.