summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-312-0/+10690
|\ | | | | | | Change-Id: I98b8cbf084167c9d07426a14116f1a03dfa896fe
| * Add binary compatibility files for qtconnectivity 5.14 branchMilla Pohjanheimo2019-12-202-0/+10690
| | | | | | | | | | | | | | | | BC files built against 5.14.0 added. Change-Id: Ida4b77e83f39e69271133a11a5cdaa03ec844ad5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-101-3/+3
|\| | | | | | | Change-Id: I6a7635841698e6de98d94ac8b21a1764f01569e2
| * Fix a few compiler warnings in lowenergydescriptor unit testAlex Blasche2019-12-041-3/+3
| | | | | | | | | | Change-Id: Ic77df9c81ff0b56408d2636582f976f2140708e2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Fix failing tst_qlowenergydescriptorAndre de la Rocha2019-11-291-4/+4
| | | | | | | | | | | | | | | | | | | | tst_qlowenergydescriptor::tst_assignCompare() could fail due to a dependency on a particular characteristic found in a BLE device used for development tests. It should work regardless of it. Fixes: QTBUG-79492 Change-Id: Ia0d640b547c1170523e7b9304c7de175da432886 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into devSimon Hausmann2019-10-041-3/+3
|\ \ | |/ |/| | | | | | | | | | | Conflicts: .qmake.conf src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp Change-Id: Ie540a926afa800a73df6fedb23adb6502996a81b
| * Fix Qt6 buildAlexandru Croitor2019-08-011-3/+3
| | | | | | | | | | | | | | | | | | Prepend namespace to text stream operands and fix deprecated function and enum usage. Change-Id: Ib9c74f940173f678d7c5af143cd2fd4e8da982e7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Merge branch 'wip/win' into devOliver Wolff2019-08-203-33/+61
|\ \ | | | | | | | | | | | | | | | | | | [ChangeLog][QtBluetooth] Added possibility to build win32 backend which also works on Windows 7. Change-Id: I03aabdec781d0e8cef2e500ee94ab423b5ba2b56
| * \ Merge remote-tracking branch 'origin/dev' into wip/winOliver Wolff2019-08-076-56/+10718
| |\ \ | | | | | | | | | | | | Change-Id: I83175151c0eef1a11d2f21648cc04c86e46777c1
| * | | Enable the use of the Win32 Bluetooth backendAndre de la Rocha2019-08-053-33/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change enables the optional use of the Win32-based Bluetooth backend on Windows. By default, the WinRT backend is used, if supported by the platform. The use of the Win32 backend must be selected by the -native-win32-bluetooth configuration option. Task-number: QTBUG-40698 Change-Id: I6904bf077467d826e3ff5ad026ebae5f955f2e37 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | | Add ability to have multiple manufacturer data per manufacturer IDAlex Blasche2019-08-081-0/+34
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current QBluetoothDeviceInfo API is somewhat limited as it cannot clearly express the nature of multiple data sets per manufacturerId. The API should really offer: QMultiHash<quint16, QByteArray> QBluetoothDeviceInfo::manufacturerData() const QVector<QByteArray> QBluetoothDeviceInfo::manufacturerData(quint16 manufacturerId) const Adding overloads and usual deprecation warnings cannot be done during Qt 5.x time though as the required overloads merely change the return types. Overloads which only offer different return types are not permitted by C++. The plan is to replace w/o deprecation in the Qt 6 branch. To avoid the API change during Qt 5.x, this patch leverages QHash::insertMulti(). There is a minor API behavior change that comes along with this approach. Previously, old manufacturer data for a given manufacturerId was replaced by the new value. Now, the data is added. The fact that multi inserts are permitted are a minor behavioral change too but actually desired by the nature of the bug this patch addresses. Note that there is some talk that QHash's insertMulti() capability may disappear in Qt 6. Task-number: QTBUG-76615 Change-Id: I35b737cb48d6ed83112ebe0b22853ca307f20115 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-112-0/+10612
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ic20d930b8efc843c39c6ab2af5848612d27fd661
| * | Binary compatibility files for Qt5.13.0 for QtConnectivityMilla Pohjanheimo2019-07-042-0/+10612
| | | | | | | | | | | | | | | | | | | | | Binary compatibility files added. Change-Id: I0e4d8f361769e9a7484fa0b61a70b63d0b5f86e1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | tst_qlowenergycontroller: fix concurrent discovery testTimur Pocheptsov2019-06-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was not taking care of the CoreBluetooth's inability to work with addresses. Otherwise, the same code path as Android/WinRT must be used (two connections are possible). Fixes: QTBUG-76203 Change-Id: I523130b916f7e8163f2a4a23617a0076216add80 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Remove usage of deprecated QBluetoothServiceInfo::DataCompleteAlex Blasche2019-05-071-8/+2
|/ / | | | | | | | | | | | | The related functions were deprecated by fac56a229b45395488f3e41bf178361c72b3ee1e. Change-Id: Ia94b1824bb6ea7d1a8e3bb8eb5e82074e9facb7a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta2Qt Forward Merge Bot2019-04-061-0/+6
|\ \ | | | | | | | | | Change-Id: Ieeeab88ca3afd1fb42aafb9e05bf426caec065ef
| * | Enable bttestui to test QBluetoothSocket::bytesWritten() signalAlex Blasche2019-04-011-0/+6
| | | | | | | | | | | | | | | Change-Id: Id29865014043963f7edf22cc81a2bd7a91c55a60 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-272-47/+48
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Id7c4409314c2ad5daf5bc9860befe096a2384849
| * | Convert bttestui to Qt5 style connect() syntaxAlex Blasche2019-03-251-45/+45
| | | | | | | | | | | | | | | Change-Id: Ib110da9e0a28fe54b12bcfe92d1e58447a42328e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Update SensorTag documentation URLAlex Blasche2019-03-251-2/+3
| | | | | | | | | | | | | | | Change-Id: Ia97bc59eb1d26aeba00d1c729b327c2eb857987c Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-161-0/+45
|\| | | |/ |/| | | Change-Id: Idd29729e80d44abe6404da2853c2fe1e887f7db4
| * Ensure SDP records can be byte arrays/hex encodedAlex Blasche2019-02-151-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This addresses the issue on Bluez only. macOS ignore such attribute values and WinRT implicitly converts them to hex strings. The macOS debug stream operator produced slightly different output compared to the other platforms. The output between the platforms must match though. Therefore, the general version was copied over to macOS. Task-number: QTBUG-73328 Change-Id: Ieea2a3a559b5686f7f7d16d5c75dd9ef2782cdf5 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-022-0/+9872
|\| | | | | | | Change-Id: Ic64c5646f2a1c1b057f2a27e66b37364a320b12e
| * Merge remote-tracking branch 'origin/5.12.1' into 5.12Qt Forward Merge Bot2019-02-012-0/+9872
| |\ | | | | | | | | | Change-Id: Ia29ecbbdbbc7f7e042e0d4a4c136fbd78f3f74b8
| | * Add binary compatibility files for Qt 5.12 for QtConnectivityMilla Pohjanheimo2018-12-182-0/+9872
| | | | | | | | | | | | | | | | | | | | | Binary compatibility files for 5.12 added. Change-Id: Iaf08cb6ad76e9ff2dd15c1329fc82b918c7d059a Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-222-16/+16
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ie774891eca63ff51e8829d189ca1b69d75adfe64
| * | Fix a few clazy warningsAlex Blasche2019-01-112-16/+16
| |/ | | | | | | | | | | | | Covers static accessor, auto, nullptr and casting related warnings. Change-Id: I307438b662df908a2cfa37341722b78b5777e737 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-115-1/+16
|\| | | | | | | Change-Id: I337d146591585cfae67122b030b72f6f83986b76
| * Prepare tst_qnearfieldtagtype1 for configurations with builtin_testdataOliver Wolff2018-12-061-0/+5
| | | | | | | | | | | | | | | | | | We have to add relevant test data to TESTDATA and use them from the created qrc file. Change-Id: I1ce75822ba6bc9d00db40499c3e242c5012237fd Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Prepare tst_qnearfieldtagtype2 for configurations with builtin_testdataOliver Wolff2018-12-063-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have to add relevant test data to TESTDATA and use them from the created qrc file. As the emulated TagActivator for configurations with builtin_testdata uses "nfcdata" as the root it searches for ".nfc" files, the test data has to be moved into a folder that is called like that. We cannot move the type 2 testdata into the shared nfcdata folder as this would mix up tag types 1 and 2 and thus make the tests fail. Change-Id: I424dbab5c952408b441f1d67bdcd2fad635f15f4 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Prepare tst_qnearfieldmanager for configurations with builtin_testdataOliver Wolff2018-12-061-0/+5
| | | | | | | | | | | | | | | | We have to add relevant test data to TESTDATA and use them from the created qrc file. Change-Id: I72ed86e09caf518f3f1b830ab4fec104a81313e6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-171-2/+2
|\| | | | | | | Change-Id: I074fa6330aba92ff08980848032941d123493556
| * qbluetoothlocaldevice_p.cpp: Make sure d_ptr is initializedOliver Wolff2018-11-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Backends that still use qbluetoothlocaldevce_p.cpp (namely ios and winrt) overload QBluetoothLocalDevicePrivate::isValid. While it does not make a difference for ios (as false is returned if no d_ptr is initialized) local device will be seen as invalid on winrt if there is no d_ptr. Fixes: QTBUG-67090 Change-Id: I82dfa4563be0ed4800f0a8dd2a9ccfc3fe313e3b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-032-4/+6
|\| | | | | | | Change-Id: Ifeb86dcc744f95f31f5f0fbdd0097cf49bfda670
| * Fix SDP BrowseGroupList entryAlex Blasche2018-10-162-4/+6
| | | | | | | | | | | | | | | | | | | | | | A BrowseGroupList is defined as sequence in which each element is a UUID that represents a browse group to which the service record belongs. Except for the QBluetoothServer::listen() implementation every other implementation did not use the sequence pattern. This patch unifies all BrowseGroupList entries through QtBluetooth and its examples/tests. Change-Id: I37640ae0500c557d79350359883abc6a66a46346 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'gerrit/5.12' into devAlex Blasche2018-10-162-4/+11
|\| | | | | | | | | | | | | Conflicts: src/bluetooth/osx/osxbtsdpinquiry.mm Change-Id: I637adc5a5271e136af7d0ac6380086728ffb15c5
| * Fix the BluetoothProfileDescriptorStructureAlex Blasche2018-10-152-4/+11
| | | | | | | | | | | | | | | | | | | | | | As per spec this is meant to be a list/sequence within a sequence and the version was missing too. For simplicity version 1.0 is used. Fixes: QTBUG-58529 Change-Id: I57090148aadf60ea1fbbb207ff0a4ae61e06caf2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Deprecate QBluetoothDeviceInfo::DataCompleteness with Qt 6 in mindAlex Blasche2018-10-091-0/+5
|/ | | | | | | | | | The patch deprecates the mentioned enum and all users of it. In addition, QList usage is replaced by QVector (which is a design pattern in Qt). Task-number: QTBUG-62425 Change-Id: I63e8dceb03ed231d0d06709896a1aad2b6bb31a3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add limited PinCode pairing support to bttestui appAlex Blasche2018-09-262-2/+9
| | | | | | | This help quicker testing of the feature. Change-Id: I2389b1126ac2ea0ffc9dea4bb7561c683cf97088 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* qRegisterMetaType for QBluetoothServiceInfoAlex Blasche2018-08-281-1/+0
| | | | | | | | Android internals seem to require it. All other existing test related registrations are removed as they are obsolete after this patch. Change-Id: I49aa3b79bdc8ca5f463f4f7a88cbb612db39d15e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Remove direct usage of QLowEnergyController::ctorAlex Blasche2018-08-212-2/+2
| | | | | | | | QLowEnergyController::createCentral() is the official API to do the same. Change-Id: Idbd26d201b24add6697f6f9cdf1194511c160273 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Replace foreach with for loop and set QT_NO_FOREACHOliver Wolff2018-08-1511-51/+64
| | | | | | | | To avoid unnecessary copies, const is used wherever possible. Change-Id: Ic743716512751cfd24fad5bd37c244b115dd26fe Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add binary compatibility files for Qt 5.11Milla Pohjanheimo2018-06-052-0/+9742
| | | | | | | Add files to test binary compatibility for QtConnectivity Change-Id: If3f921dd2a73f1f3b7fdbf8dc18e5322a03acbee Reviewed-by: Liang Qi <liang.qi@qt.io>
* Improve robustness of tst_lowenergycontroller testAlex Blasche2018-01-251-15/+36
| | | | | | | | | | | | | | | | | | The test checks the value of various descriptors and characteristics of the TI Sensortag. One of those values are ClientCharacteristicConfiguration descriptors. This type of descriptor is consistent across multiple session for the same connecting central device. Therefore it may change and would create frequent test failures. Even worse, the unit test itself toggles the CCC value and assuming that a test may fail, the CC may remain with an uncertain value. This change makes the CCC value test more generic as it checks that the found value is within the acceptable range w/o expecting a defined value. Change-Id: I004a1037ee9e602807e4df5511c7d2205c92e5fe Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Make tst_lowenergycontroller pass on DBUS Bluez backendAlex Blasche2018-01-251-22/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition the patch adds a few improvements making the tests somewhat more reliable. 1.) The 0x1800 BTLE Generic Access service is not exposed by BlueZ's API. That's a deliberate decision by the devs. The patch removes the service from the list of to-be-checked services. 2.) QTBUG-42519 is a limitation of the non-DBus BTLE implementation and cannot be fixed. The new DBus API does permit concurrent QLowEnergyController instances. However the instances share a platform wide singleton which means that if one instance is connected then the other instances connects as well. Other platforms separate the connectivity between instances. Therefore tst_concurrentDiscovery() has to offer three different behavior patterns 3.) Consecutive calls to writeDescriptor() in tst_readWriteDescriptor() cause a crash of bluetoothd (version 5.47 or below) and a premature disconnect from the BLE device in version BlueZ 5.48. To avoid the problem qWait calls were introduced to delay the time between individual calls. 4.) Improves the robustness of the tst_writeCharacteristicNoResponse() test which relied on notifications being enabled for two of its characteristics. So far the notifications for one characteristic were enabled but not for the other. For some magical reason this happened to be the case on all platforms but the new DBUS BTLE implementation. 5.) Swapped out some QVERIFY statements in favor of QCOMPARE. This provides better error visibility when a test fails. 6.) The patch adds a time limitation of BTLE discovery which reduces the time the entire test run takes. This is API that was recently added. Change-Id: Ib633a87614af9cbccdb0253ba47fd059a2013358 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-204-0/+9794
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I6e93fc7435a49b601a5c10519ed86d2a15125074
| * Expect failure for cmac tests on qemu testsSami Nurmenniemi2018-01-032-0/+52
| | | | | | | | | | | | | | | | | | | | Qemu-user can't hande socket option SOL_ALG, this change detects that situation for boot2qt targets and expects failure. Task-number: QTBUG-63152 Change-Id: I4ac0c9b619caa789daf71c1567332749e5bbcd1e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Add binary compatibility files for QtConnectivity for 5.10Milla Pohjanheimo2017-12-132-0/+9742
| | | | | | | | | | | | | | Binary compatibility files added for 5.10.0 Change-Id: I027491568fb9fa8017a0bc234027522b41f755c2 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Unify meta type registration for QLEDescriptor and QLECharacteristicAlex Blasche2017-11-032-6/+0
|/ | | | | | | | | The QLEControllerPrivate objects use the same function (apart from Apple platforms) and unit tests do not have to register those types at all anymore. Change-Id: I06a4a035f5a8fba9a146a3c05d1157b47c22e056 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Use config feature when checking for winrt backend in auto testsOliver Wolff2017-08-307-18/+26
| | | | | | | | | | | | As the winrt backend may also be used on desktop Windows, checking for the operating system does no longer work. While touching these lines deprecated OS X checks were fixed as well. Task-number: QTBUG-61566 Change-Id: I247979aa63de6a71ac4908bda946d7db1e29b6c3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>