diff options
author | Juha Vuolle <juha.vuolle@insta.fi> | 2022-08-26 12:52:51 +0300 |
---|---|---|
committer | Juha Vuolle <juha.vuolle@insta.fi> | 2022-08-30 07:59:06 +0300 |
commit | 1ef066bf7d7a67d1b381443b9ecfa60f9204aca8 (patch) | |
tree | 28cdae6c49a6e5146bff1a61cd0c33c689d8841e /tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp | |
parent | 5a5abc2d7388504510988df01e840d5dbe222ee0 (diff) |
Skip parts of Bluetooth autotests on Android 12+ emulator
The CI uses Android emulator for running bluetooth tests for Android.
Up until Android 12 the emulator didn't have a bluetooth and only
the bluetooth parts which don't require actual bluetooth were tested.
This is similar to other platforms' bluetooth testing on CI.
The Android 12 emulator introduces a Bluetooth emulation. This causes
trouble when running tests on CI, as using bluetooth triggers
end-user dialogues, and consequently test cases time out waiting for
them.
This commit skips the problematic parts when tests are built for Android
in CI environment. This way the developers and testers can still run
the full bluetooth tests locally without need for manually removing the
skips.
Pick-to: 6.4 6.3 6.2
Fixes: QTBUG-105803
Fixes: QTBUG-105808
Change-Id: I20bac041c3a4a0b83058482305dc735122d4c489
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp')
-rw-r--r-- | tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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; |