summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/auto/CMakeLists.txt5
-rw-r--r--tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp8
-rw-r--r--tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp19
-rw-r--r--tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp7
-rw-r--r--tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp4
5 files changed, 23 insertions, 20 deletions
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
index 3b32a869..6b52956d 100644
--- a/tests/auto/CMakeLists.txt
+++ b/tests/auto/CMakeLists.txt
@@ -2,6 +2,11 @@
# SPDX-License-Identifier: BSD-3-Clause
if(TARGET Qt::Bluetooth)
+ if(ANDROID)
+ if("$ENV{QTEST_ENVIRONMENT}" STREQUAL "ci")
+ add_compile_definitions(ANDROID_CI_TEST_ENVIRONMENT)
+ endif()
+ endif()
add_subdirectory(qbluetoothaddress)
add_subdirectory(qbluetoothdevicediscoveryagent)
add_subdirectory(qbluetoothdeviceinfo)
diff --git a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp
index 8e918b21..4cd2ddf9 100644
--- a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp
+++ b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp
@@ -128,9 +128,9 @@ void tst_QBluetoothDeviceDiscoveryAgent::deviceDiscoveryDebug(const QBluetoothDe
void tst_QBluetoothDeviceDiscoveryAgent::tst_startStopDeviceDiscoveries()
{
-#ifdef Q_OS_ANDROID
+#ifdef ANDROID_CI_TEST_ENVIRONMENT
if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31)
- QSKIP("Fails on Android 12 in CI (QTBUG-105803)");
+ QSKIP("Skipping test on Android 12+, emulator on CI can timeout waiting for user input");
#endif
QBluetoothDeviceDiscoveryAgent discoveryAgent;
@@ -404,9 +404,9 @@ void tst_QBluetoothDeviceDiscoveryAgent::tst_discoveryTimeout()
void tst_QBluetoothDeviceDiscoveryAgent::tst_discoveryMethods()
{
-#ifdef Q_OS_ANDROID
+#ifdef ANDROID_CI_TEST_ENVIRONMENT
if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31)
- QSKIP("Fails on Android 12 in CI (QTBUG-105803)");
+ QSKIP("Skipping test on Android 12+, emulator on CI can timeout waiting for user input");
#endif
const QBluetoothLocalDevice localDevice;
if (localDevice.allDevices().size() != 1) {
diff --git a/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp b/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp
index c610038e..d395379c 100644
--- a/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp
+++ b/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp
@@ -78,9 +78,9 @@ void tst_QBluetoothLocalDevice::initTestCase()
void tst_QBluetoothLocalDevice::tst_powerOn()
{
-#ifdef Q_OS_ANDROID
+#ifdef ANDROID_CI_TEST_ENVIRONMENT
if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31)
- QSKIP("Skipping test on Android 12+, it can timeout waiting for user input (QTBUG-104914)");
+ QSKIP("Skipping test on Android 12+, emulator on CI can timeout waiting for user input");
#endif
#ifdef Q_OS_OSX
QSKIP("Not possible on OS X");
@@ -114,9 +114,9 @@ void tst_QBluetoothLocalDevice::tst_powerOn()
void tst_QBluetoothLocalDevice::tst_powerOff()
{
-#ifdef Q_OS_ANDROID
+#ifdef ANDROID_CI_TEST_ENVIRONMENT
if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31)
- QSKIP("Skipping test on Android 12+, it can timeout waiting for user input (QTBUG-104914)");
+ QSKIP("Skipping test on Android 12+, emulator on CI can timeout waiting for user input");
#endif
#ifdef Q_OS_OSX
QSKIP("Not possible on OS X");
@@ -192,9 +192,9 @@ void tst_QBluetoothLocalDevice::tst_hostModes_data()
void tst_QBluetoothLocalDevice::tst_hostModes()
{
-#ifdef Q_OS_ANDROID
+#ifdef ANDROID_CI_TEST_ENVIRONMENT
if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31)
- QSKIP("Skipping test on Android 12+, it can timeout waiting for user input (QTBUG-104914)");
+ QSKIP("Skipping test on Android 12+, emulator on CI can timeout waiting for user input");
#endif
#ifdef Q_OS_OSX
QSKIP("Not possible on OS X");
@@ -371,10 +371,9 @@ 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)");
- }
+#ifdef ANDROID_CI_TEST_ENVIRONMENT
+ if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31)
+ QSKIP("Skipping test on Android 12+, emulator on CI can timeout waiting for user input");
#endif
#if defined(Q_OS_MACOS)
QSKIP("The pair device test fails on macOS");
diff --git a/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp b/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
index 6be10ec7..bf1a55b9 100644
--- a/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
+++ b/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
@@ -144,10 +144,9 @@ 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)");
- }
+#ifdef ANDROID_CI_TEST_ENVIRONMENT
+ if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31)
+ QSKIP("Skipping test on Android 12+, emulator on CI can timeout waiting for user input");
#endif
QBluetoothLocalDevice localDev;
diff --git a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
index d8197780..a2979dc1 100644
--- a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
+++ b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
@@ -90,9 +90,9 @@ void tst_QBluetoothServiceDiscoveryAgent::serviceError(const QBluetoothServiceDi
void tst_QBluetoothServiceDiscoveryAgent::initTestCase()
{
-#ifdef Q_OS_ANDROID
+#ifdef ANDROID_CI_TEST_ENVIRONMENT
if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31)
- QSKIP("Fails on Android 12 in CI (QTBUG-105803)");
+ QSKIP("Skipping test on Android 12+, emulator on CI can timeout waiting for user input");
#endif
if (localDeviceAvailable) {
QBluetoothDeviceDiscoveryAgent discoveryAgent;