diff options
| author | Russell Yanofsky <[email protected]> | 2017-04-03 11:07:40 -0400 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2017-04-03 11:07:40 -0400 |
| commit | bf1026412da73b13ada3b4543e88938057362eb7 (patch) | |
| tree | d142e319ea05da2493f1c245d5011838f4b0dc12 /src/qt/test/test_main.cpp | |
| parent | Merge #9533: Allow non-power-of-2 signature cache sizes (diff) | |
| download | discoin-bf1026412da73b13ada3b4543e88938057362eb7.tar.xz discoin-bf1026412da73b13ada3b4543e88938057362eb7.zip | |
Run bitcoin_test-qt under minimal QPA platform
Fixes broken "make check" reported by Matt Corallo <[email protected]> in
https://github.com/bitcoin/bitcoin/issues/10110
Fix was suggested and initially implemented by
Cory Fields <[email protected]> in
https://github.com/bitcoin/bitcoin/pull/10117#issuecomment-290275236
Diffstat (limited to 'src/qt/test/test_main.cpp')
| -rw-r--r-- | src/qt/test/test_main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index d8bcfedb7..cae18f41a 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -31,6 +31,9 @@ Q_IMPORT_PLUGIN(qjpcodecs) Q_IMPORT_PLUGIN(qtwcodecs) Q_IMPORT_PLUGIN(qkrcodecs) #else +#if defined(QT_QPA_PLATFORM_MINIMAL) +Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin); +#endif #if defined(QT_QPA_PLATFORM_XCB) Q_IMPORT_PLUGIN(QXcbIntegrationPlugin); #elif defined(QT_QPA_PLATFORM_WINDOWS) @@ -53,6 +56,11 @@ int main(int argc, char *argv[]) bool fInvalid = false; + // Prefer the "minimal" platform for the test instead of the normal default + // platform ("xcb", "windows", or "cocoa") so tests can't unintentially + // interfere with any background GUIs and don't require extra resources. + setenv("QT_QPA_PLATFORM", "minimal", 0); + // Don't remove this, it's needed to access // QApplication:: and QCoreApplication:: in the tests QApplication app(argc, argv); |