diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2022-07-12 21:18:56 +0300 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2022-07-14 15:20:17 +0300 |
commit | 969da30250f575afb8b8a1df8a3b063fbc96b98e (patch) | |
tree | af5440db04e71768788482d8a94018e0d6564be0 /tests | |
parent | aa8005782170e84b1831783abfe5c74f1ea04989 (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+.
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104914
Change-Id: Ibadaf3a4d67170e33dcdcbe836c6d1a2e8a55c23
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp | 17 | ||||
-rw-r--r-- | tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp | 6 |
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) |