summaryrefslogtreecommitdiffstats
path: root/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2022-09-19 12:32:03 +0300
committerJuha Vuolle <juha.vuolle@insta.fi>2022-09-27 08:54:38 +0300
commit90251f51be3af2d6db994b92993f2944345e10a6 (patch)
tree199b0620de01255df6de52ddd0df539638e7cefd /tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
parent214b65935eb7722fd8995f3ae834be76496b8d69 (diff)
Skip few Bluetooth autotests on Android emulator
This is to unblock Android-12 emulator deployment on CI which, unlike the earlier emulators, has a bluetooth emulation. This means that the emulator triggers permission confirmation dialogues which would timeout on CI. This commit replaces the 1ef066bf7d7a67d1b381443b9ecfa60f9204aca8, which attempted to solve the issue by compile-time configuration. Pick-to: 6.2 6.3 6.4 Task-number: QTBUG-106614 Change-Id: Idc155bb8617802054d6ab19993f5417cc254f16e Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp')
-rw-r--r--tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
index a2979dc1..b9e0dfb3 100644
--- a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
+++ b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
@@ -7,6 +7,7 @@
#include <QLoggingCategory>
#include <QVariant>
#include <QList>
+#include "../../shared/bttestutil_p.h"
#include <qbluetoothaddress.h>
#include <qbluetoothdevicediscoveryagent.h>
@@ -50,7 +51,8 @@ private:
tst_QBluetoothServiceDiscoveryAgent::tst_QBluetoothServiceDiscoveryAgent()
{
QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true"));
-
+ if (androidBluetoothEmulator())
+ return;
// start Bluetooth if not started
#ifndef Q_OS_OSX
QBluetoothLocalDevice *device = new QBluetoothLocalDevice();
@@ -90,10 +92,9 @@ void tst_QBluetoothServiceDiscoveryAgent::serviceError(const QBluetoothServiceDi
void tst_QBluetoothServiceDiscoveryAgent::initTestCase()
{
-#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 (androidBluetoothEmulator())
+ QSKIP("Skipping test on Android 12+ emulator, CI can timeout waiting for user input");
+
if (localDeviceAvailable) {
QBluetoothDeviceDiscoveryAgent discoveryAgent;