summaryrefslogtreecommitdiff
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-10-04 07:53:07 +0300
commit46441888164208ed09ce144f3df0ac9713648db8 (patch)
tree83d2b82bbbc871426e16bad40cafbfa91a860883 /tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
parent3284614452f011b1788f7500e22c297f9c801633 (diff)
downloadqtconnectivity-46441888164208ed09ce144f3df0ac9713648db8.tar.gz
Skip few Bluetooth autotests on Android emulator6.3
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. 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> (cherry picked from commit 90251f51be3af2d6db994b92993f2944345e10a6)
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 8d790357..27827da3 100644
--- a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
+++ b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
@@ -32,6 +32,7 @@
#include <QLoggingCategory>
#include <QVariant>
#include <QList>
+#include "../../shared/bttestutil_p.h"
#include <qbluetoothaddress.h>
#include <qbluetoothdevicediscoveryagent.h>
@@ -75,7 +76,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();
@@ -115,10 +117,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;