diff options
Diffstat (limited to 'tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp')
-rw-r--r-- | tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp | 11 |
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; |