summaryrefslogtreecommitdiffstats
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
commit9e748b43a7d10230716524643d14f9b5d7fb0049 (patch)
treef827583145b670c6fb752053a7a855a6afb91599
parent5529b6bc622e9fcbbb2a194b4458356a62b7627e (diff)
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 8015ed34..3c9e3614 100644
--- a/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp
+++ b/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp
@@ -102,6 +102,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
@@ -134,6 +138,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
@@ -192,6 +200,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
@@ -371,6 +383,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 3d757aa4..17242afc 100644
--- a/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
+++ b/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
@@ -169,6 +169,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)