summaryrefslogtreecommitdiffstats
path: root/tests/auto/qbluetoothdevicediscoveryagent
diff options
context:
space:
mode:
authoralex <alex.blasche@nokia.com>2012-06-25 12:49:03 +1000
committerQt by Nokia <qt-info@nokia.com>2012-06-27 02:36:18 +0200
commit2cf4fc7c63622326780646375cf4c7c2fd014345 (patch)
tree2592a66068d5791f538358f0e68173afd4cb7373 /tests/auto/qbluetoothdevicediscoveryagent
parentf60cccfc4eef73ecc8e79c4b0826e7dcaf212c2b (diff)
Fix various Bluetooth tests such that they run via CI
The CI system doesn't have any Bluetooth devices attached to it. Task-number: QTBUG-22017 Change-Id: I136d8f1295f3e770eb8c66557343ede7fa438a06 Reviewed-by: Michael Zanetti <michael.zanetti@nokia.com> Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
Diffstat (limited to 'tests/auto/qbluetoothdevicediscoveryagent')
-rw-r--r--tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp
index 31ed1a03..30d8946b 100644
--- a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp
+++ b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp
@@ -94,6 +94,9 @@ void tst_QBluetoothDeviceDiscoveryAgent::initTestCase()
qRegisterMetaType<QBluetoothDeviceInfo>("QBluetoothDeviceInfo");
qRegisterMetaType<QBluetoothDeviceDiscoveryAgent::InquiryType>("QBluetoothDeviceDiscoveryAgent::InquiryType");
+ if (!QBluetoothLocalDevice::allDevices().count())
+ QSKIP("Skipping test due to missing Bluetooth device");
+
// turn on BT in case it is not on
QBluetoothLocalDevice *device = new QBluetoothLocalDevice();
if (device->hostMode() == QBluetoothLocalDevice::HostPoweredOff) {