Skip to content

Commit faccf5f

Browse files
author
MarcoFalke
committed
doc: Explain QT_QPA_PLATFORM for gui tests
1 parent 6e4f655 commit faccf5f

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/qt/test/addressbooktests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ void AddressBookTests::addressBookTests()
146146
// and fails to handle returned nulls
147147
// (https://bugreports.qt.io/browse/QTBUG-49686).
148148
QWARN("Skipping AddressBookTests on mac build with 'minimal' platform set due to Qt bugs. To run AppTests, invoke "
149-
"with 'test_bitcoin-qt -platform cocoa' on mac, or else use a linux or windows build.");
149+
"with 'QT_QPA_PLATFORM=cocoa test_bitcoin-qt' on mac, or else use a linux or windows build.");
150150
return;
151151
}
152152
#endif

src/qt/test/apptests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void AppTests::appTests()
5757
// and fails to handle returned nulls
5858
// (https://bugreports.qt.io/browse/QTBUG-49686).
5959
QWARN("Skipping AppTests on mac build with 'minimal' platform set due to Qt bugs. To run AppTests, invoke "
60-
"with 'test_bitcoin-qt -platform cocoa' on mac, or else use a linux or windows build.");
60+
"with 'QT_QPA_PLATFORM=cocoa test_bitcoin-qt' on mac, or else use a linux or windows build.");
6161
return;
6262
}
6363
#endif

src/qt/test/test_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ int main(int argc, char *argv[])
6363
#if defined(WIN32)
6464
_putenv_s("QT_QPA_PLATFORM", "minimal");
6565
#else
66-
setenv("QT_QPA_PLATFORM", "minimal", 0);
66+
setenv("QT_QPA_PLATFORM", "minimal", /* overwrite */ 0);
6767
#endif
6868

6969
// Don't remove this, it's needed to access

src/qt/test/wallettests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ void BumpFee(TransactionView& view, const uint256& txid, bool expectDisabled, st
123123
//
124124
// This also requires overriding the default minimal Qt platform:
125125
//
126-
// src/qt/test/test_bitcoin-qt -platform xcb # Linux
127-
// src/qt/test/test_bitcoin-qt -platform windows # Windows
128-
// src/qt/test/test_bitcoin-qt -platform cocoa # macOS
126+
// QT_QPA_PLATFORM=xcb src/qt/test/test_bitcoin-qt # Linux
127+
// QT_QPA_PLATFORM=windows src/qt/test/test_bitcoin-qt # Windows
128+
// QT_QPA_PLATFORM=cocoa src/qt/test/test_bitcoin-qt # macOS
129129
void TestGUI()
130130
{
131131
// Set up wallet and chain with 105 blocks (5 mature blocks for spending).
@@ -256,7 +256,7 @@ void WalletTests::walletTests()
256256
// and fails to handle returned nulls
257257
// (https://bugreports.qt.io/browse/QTBUG-49686).
258258
QWARN("Skipping WalletTests on mac build with 'minimal' platform set due to Qt bugs. To run AppTests, invoke "
259-
"with 'test_bitcoin-qt -platform cocoa' on mac, or else use a linux or windows build.");
259+
"with 'QT_QPA_PLATFORM=cocoa test_bitcoin-qt' on mac, or else use a linux or windows build.");
260260
return;
261261
}
262262
#endif

0 commit comments

Comments
 (0)