summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2022-03-23 11:03:39 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-03-25 10:12:48 +0000
commit5f0f7db107e3ca15a58ccf48fbbcae8c69b8e305 (patch)
treefd8c41850385d74797eae047bed63390f5c6fa1e
parentf13c1a3461e2fdeb0edc2e1581e9842a43dc8990 (diff)
downloadqtconnectivity-5f0f7db107e3ca15a58ccf48fbbcae8c69b8e305.tar.gz
Omit Bluetooth socket peername testcase exact check on Windows
On Windows the bluetooth socket's remotehost display name seems to be formed from the remote BT address. Change-Id: Iab0f77333fdd5f8421af41dd7bc4c8779d3c3fea Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 52f003bcc399b0c38772d8bc6f5db53bafab37a6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp b/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp
index 653dde4a..7fdae313 100644
--- a/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp
+++ b/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp
@@ -287,7 +287,13 @@ void tst_QBluetoothSocket::tst_serviceConnection()
//check the peer & local info
QCOMPARE(socket.localAddress(), localDevice.address());
QCOMPARE(socket.localName(), localDevice.name());
+#ifdef Q_OS_WIN
+ // On Windows the socket peer name (aka remotehost display name) seems to be
+ // formed from the BT address and not necessarily the remoteDevice name
+ QVERIFY(!socket.peerName().isEmpty());
+#else
QCOMPARE(socket.peerName(), remoteDevice.name());
+#endif
QCOMPARE(socket.peerAddress(), remoteDevice.address());
/* Disconnection */