Skip to content

Commit e754c6e

Browse files
committed
Merge #14011: Disable wallet and address book Qt tests on macOS minimal platform
a3197c5 Disable wallet and address book Qt tests on macOS minimal platform (Russell Yanofsky) Pull request description: macOS minimal platform is frequently broken, and these are currently failing with Qt 5.11.1. The tests do pass when run on the full cocoa platform (with `test_bitcoin-qt -platform cocoa`). Stack trace from test crash: https://gist.github.com/ryanofsky/3401fb63c52d13d5585e7fc777361f1e Tree-SHA512: a05644ef15d75ea7d7f85ea804c6a5fe78e4e7358b189cbab639d9f7dc46163a35f77f7a2b4ae2fd6be5b9fb22898386b4d88069d5ee8d5fdbd995157c6f0846
2 parents dc1e542 + a3197c5 commit e754c6e

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

src/qt/test/addressbooktests.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <key_io.h>
1818
#include <wallet/wallet.h>
1919

20+
#include <QApplication>
2021
#include <QTimer>
2122
#include <QMessageBox>
2223

@@ -139,5 +140,16 @@ void TestAddAddressesToSendBook()
139140

140141
void AddressBookTests::addressBookTests()
141142
{
143+
#ifdef Q_OS_MAC
144+
if (QApplication::platformName() == "minimal") {
145+
// Disable for mac on "minimal" platform to avoid crashes inside the Qt
146+
// framework when it tries to look up unimplemented cocoa functions,
147+
// and fails to handle returned nulls
148+
// (https://bugreports.qt.io/browse/QTBUG-49686).
149+
QWARN("Skipping AddressBookTests on mac build with 'minimal' platform set due to Qt bugs. To run AppTests, invoke "
150+
"with 'test_bitcoin-qt -platform cocoa' on mac, or else use a linux or windows build.");
151+
return;
152+
}
153+
#endif
142154
TestAddAddressesToSendBook();
143155
}

src/qt/test/wallettests.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,5 +243,16 @@ void TestGUI()
243243

244244
void WalletTests::walletTests()
245245
{
246+
#ifdef Q_OS_MAC
247+
if (QApplication::platformName() == "minimal") {
248+
// Disable for mac on "minimal" platform to avoid crashes inside the Qt
249+
// framework when it tries to look up unimplemented cocoa functions,
250+
// and fails to handle returned nulls
251+
// (https://bugreports.qt.io/browse/QTBUG-49686).
252+
QWARN("Skipping WalletTests on mac build with 'minimal' platform set due to Qt bugs. To run AppTests, invoke "
253+
"with 'test_bitcoin-qt -platform cocoa' on mac, or else use a linux or windows build.");
254+
return;
255+
}
256+
#endif
246257
TestGUI();
247258
}

0 commit comments

Comments
 (0)