diff options
author | alex <alex.blasche@nokia.com> | 2012-06-25 12:09:05 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-25 04:14:52 +0200 |
commit | 32c543f3e31b64612cb400d91769bf91f8fef971 (patch) | |
tree | 753ec0d1c4b069321ec7b63cb3644821fd72730e /tests/auto | |
parent | 891cfea66f05e5dcc8892c1a099179bad7a72281 (diff) |
Fix QBluetoothServiceInfo test
The test can never succeed in CI as long as CI doesn't have an attached
Bluetooth device. Skip test when approrpiate.
Task-number: QTBUG-25452
Change-Id: Iaeb4e4c2d978a8806e20dfee32b41c967503482a
Reviewed-by: Alex <alex.blasche@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp b/tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp index 0ec6cd6a..d8df8e9a 100644 --- a/tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp +++ b/tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp @@ -232,12 +232,15 @@ void tst_QBluetoothServiceInfo::tst_assignment() copyInfo = serviceInfo; QVERIFY(!copyInfo.isRegistered()); - QEXPECT_FAIL("assignment_data", "QTBUG-25452", Abort); - QVERIFY(copyInfo.registerService()); - QVERIFY(copyInfo.isRegistered()); - - QVERIFY(copyInfo.unregisterService()); - QVERIFY(!copyInfo.isRegistered()); + if (!QBluetoothLocalDevice::allDevices().count()) { + QSKIP("Skipping test due to missing Bluetooth device"); + } else { + QVERIFY(copyInfo.registerService()); + QVERIFY(copyInfo.isRegistered()); + + QVERIFY(copyInfo.unregisterService()); + QVERIFY(!copyInfo.isRegistered()); + } } } |