summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2022-07-12 21:18:56 +0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-07-14 13:15:02 +0000
commit84a437fce1b88cd5a8d5ffb2c218ffff1195f502 (patch)
tree42b5eb226a0bafba295adb02d48ed7f60f557cfb
parentc5e6f10750a975108773add47e7e2e7731446734 (diff)
downloadqtconnectivity-84a437fce1b88cd5a8d5ffb2c218ffff1195f502.tar.gz
Android: skip some bluetooth test cases that fail on Android 12 CI
Android 12 sends popups to user about operations in bluetooth like enbaling or disabling or scanning for devices, and these popops will wait for user action. On CI or in qtconnectivity we don't wait for those so some tests are either failing or timing out. This patch skips the tests on Android 12+. Task-number: QTBUG-104914 Change-Id: Ibadaf3a4d67170e33dcdcbe836c6d1a2e8a55c23 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 969da30250f575afb8b8a1df8a3b063fbc96b98e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp17
-rw-r--r--tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp6
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp b/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp
index 7000be98..c610038e 100644
--- a/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp
+++ b/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp
@@ -78,6 +78,10 @@ void tst_QBluetoothLocalDevice::initTestCase()
void tst_QBluetoothLocalDevice::tst_powerOn()
{
+#ifdef Q_OS_ANDROID
+ if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31)
+ QSKIP("Skipping test on Android 12+, it can timeout waiting for user input (QTBUG-104914)");
+#endif
#ifdef Q_OS_OSX
QSKIP("Not possible on OS X");
#endif
@@ -110,6 +114,10 @@ void tst_QBluetoothLocalDevice::tst_powerOn()
void tst_QBluetoothLocalDevice::tst_powerOff()
{
+#ifdef Q_OS_ANDROID
+ if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31)
+ QSKIP("Skipping test on Android 12+, it can timeout waiting for user input (QTBUG-104914)");
+#endif
#ifdef Q_OS_OSX
QSKIP("Not possible on OS X");
#endif
@@ -184,6 +192,10 @@ void tst_QBluetoothLocalDevice::tst_hostModes_data()
void tst_QBluetoothLocalDevice::tst_hostModes()
{
+#ifdef Q_OS_ANDROID
+ if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31)
+ QSKIP("Skipping test on Android 12+, it can timeout waiting for user input (QTBUG-104914)");
+#endif
#ifdef Q_OS_OSX
QSKIP("Not possible on OS X");
#endif
@@ -359,6 +371,11 @@ void tst_QBluetoothLocalDevice::tst_pairDevice_data()
void tst_QBluetoothLocalDevice::tst_pairDevice()
{
+#ifdef Q_OS_ANDROID
+ if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31) {
+ QSKIP("Skipping test on Android 12+, it can timeout waiting for user input (QTBUG-104914)");
+ }
+#endif
#if defined(Q_OS_MACOS)
QSKIP("The pair device test fails on macOS");
#endif
diff --git a/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp b/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
index cc892057..6be10ec7 100644
--- a/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
+++ b/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
@@ -144,6 +144,12 @@ void tst_QBluetoothServer::tst_receive()
{
QFETCH(QBluetoothLocalDevice::HostMode, hostmode);
+#ifdef Q_OS_ANDROID
+ if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31) {
+ QSKIP("Skipping test on Android 12+, it can timeout waiting for user input (QTBUG-104914)");
+ }
+#endif
+
QBluetoothLocalDevice localDev;
#ifdef Q_OS_OSX
if (localDev.hostMode() == QBluetoothLocalDevice::HostPoweredOff)