summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Merge remote-tracking branch 'gerrit/5.9' into devAlex Blasche2017-08-073-2/+21
|\ | | | | | | Change-Id: I0ed4afd881f483a166a7e1400043f116c491f30c
| * winrt: "Fix" tst_qbluetoothlocaldeviceOliver Wolff2017-08-041-1/+14
| | | | | | | | | | | | | | | | | | | | Reflect the default values that are different on winrt in the auto test. Obtaining the pairing status for given devices is possible on winrt, so as soon as QTBUG-62294 is fixed, this change can be partly reverted. Task-number: QTBUG-62294 Change-Id: Iceed8086f29c0f0c4859f2d86a16c2b3a9eeaffa Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * winrt: Fix tst_QBluetoothServerOliver Wolff2017-08-041-0/+2
| | | | | | | | | | | | | | | | We cannot obtain information about local bluetooth devices on winrt. Change-Id: I7805b68bff38a2a2d049619742880db5bd8d3cef Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * winrt: Make tst_QLowEnergyController pass if no remote device was givenOliver Wolff2017-08-041-1/+5
| | | | | | | | | | | | | | | | Same as on other platforms initTestCase should return early if no remote device was passed via environment variable. Change-Id: I0b45b9be6247e55c890e6d151541ab034eefa467 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-063-3/+9100
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I7a55929aefa1f7a4dc96f841317b78b248899f67
| * Update binary compatibility files for Qt 5.9.0 for QtConnectivityMilla Pohjanheimo2017-06-302-0/+9100
| | | | | | | | | | Change-Id: I18c0cec1823cc827784c10e8e5bf3ab2ff754580 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
| * Fix QNdefNfcActRecord::action for platforms with unsigned charSami Nurmenniemi2017-06-271-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | QByteArray operator [] has return type of char whose signedness is dependendent on platform and compiler. Casting char to an enum with negative value does not work on configurations with unsigned char type. Fixed by explicitly casting action to signed char before converting it to enum. Task-number: QTBUG-60268 Change-Id: I733520a70c321c3b8dac9c67cfb096ac97a64b94 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'gerrit/5.9' into devAlex Blasche2017-05-193-2/+5
|\| | | | | | | Change-Id: I37e63916ff053ebc532ae1a0e3cb518eb5369866
| * Disable/blacklist failing tests for boot2qtSami Nurmenniemi2017-04-281-0/+3
| | | | | | | | | | | | | | | | | | Currently boot2qt is tested with QEMU and some tests fail. Disabling them for now to make it possible to enable qt5 tests for Coin. Task-number: QTBUG-60266 Change-Id: I860f3f43867bac89e2eac9f36015886d5e999aa3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Support for Q_OS_ANDROID_EMBEDDED and android-embedded buildsOtto Ryynänen2017-04-242-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The Embedded Android build (Boot to Qt Android injection) is defined by having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined, as well as having Qt config android-embedded. Those flags are set in mkspecs when building for embedded Android. This commit enables the possibility to build embedded Android builds. (i.e. Qt build for Android baselayer only, without JNI) Change-Id: I2ded43d7ed46a99ba70301f07a791ed4a148c6c0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-216-10/+9074
|\| | | | | | | Change-Id: I97e00dacff4ec6b01937383efa6a6e6254fb8f87
| * Replace custom QT_BLUEZ_BLUETOOTH against the related feature defineAlex Blasche2017-04-064-10/+4
| | | | | | | | | | Change-Id: I4fbb948841a610640acaf87364e2157e31782836 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * The BlueZ feature implies that QtDBus is enabledAlex Blasche2017-04-052-2/+2
| | | | | | | | | | | | | | | | | | | | The QtBluetooth library only builds the bluez backend when qtdbus is enabled. Previously it was possible that dbus was disabled but the bluez feature flag is still set. This patch prevents this gap by directly binding the bluez feature to the dbus feature. Change-Id: I173d51f27f5b1a78241548617f602830fec7bb14 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Binary compatibility files for qtconnectivity (5.8.0)Milla Pohjanheimo2017-02-032-0/+9070
| | | | | | | | | | | | | | Added binary compatibility files for qtconnectivity Change-Id: I66667c4a59b4a079bb2a9cddefeccdeb3eaf2a64 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | Register additional meta typesLars Schmertmann2017-03-302-7/+0
|/ | | | | | | | | | | | | | | Register QLowEnergyCharacteristic and QLowEnergyDescriptor as meta types because they are used in signals. [ChangeLog][QtBluetooth] Register QLowEnergyCharacteristic and QLowEnergyDescriptor as meta types. It is therefore necessary to declare them as meta types in the header files. This commit will cause conflicts with existing meta type declarations in applications using Qt. These declarations need to be removed. Change-Id: I18f33b1b2f159cffd6efbacc37178286b86a06e0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* LE controller - add a getter for a remote device UUIDTimur Pocheptsov2016-11-231-1/+2
| | | | | | | | | | | | A device UUID is valid/works on iOS/macOS only: platforms where CoreBluetooth hides addresses and generates 128-bit uuids instead. We connect to a LE device using such a UUID. This patch adds a getter to access a UUID of a remote device our controller works with (similar to 'remoteAddress' method on other platforms). Task-number: QTBUG-52690 Change-Id: I000e17bbea90c508922ac47ce5291e28d938de7c Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Convert qtconnectivity to the new configure systemLars Knoll2016-11-013-7/+7
| | | | | | | | Properly do the detection of bluez and the linux crypto API, and don't run pkg-config at build time. Change-Id: I0f082992c0f82e90e611283ff0c2cc0143e74bd6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-195-0/+17488
|\ | | | | | | Change-Id: Ia2ce8bf47d9156c550f5360b1422b50313854338
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-163-0/+8468
| |\ | | | | | | | | | Change-Id: I3eec9a22565585d4fc40831d609a3083ce99a52c
| | * BC data files for QtConnectivity for Qt 5.6Milla Pohjanheimo2016-09-052-0/+8421
| | | | | | | | | | | | | | | | | | | | | | | | Added binary compatibility data files for tst_bic test Change-Id: I637ff03da3ca76dac8750f5a0480d61e267e850e Reviewed-by: Sergio Ahumada <sahumada@texla.cl> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| | * QBluetoothSocket::connectToService - check a socket type firstTimur Pocheptsov2016-08-261-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempt to connect to a service using a socket with UnknownProtocol socket type will fail, but can result in an incorrect UnknownSocketError reported and also can start a device discovery (then finally failing to connect after all). Check this condition early before trying to actually connect/do device discovery and report error properly as UnsupportedProtocolError. Task-number: QTBUG-55073 Change-Id: Ib39e1ca7ad401e07d6387201a4664a1185d38d39 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | BC data files added for QtConnectivity (5.7)Milla Pohjanheimo2016-09-152-0/+9020
| | | | | | | | | | | | | | | | | | | | | | | | Added the generated data files for the binary compatibility tests for QtConnectivity for Qt 5.7. Change-Id: Iedd9e2d47804f6e03925c8fcd39c5c2fc27f2e76 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | | winrt: Implement LE device discovery timeoutOliver Wolff2016-08-041-1/+1
| | | | | | | | | | | | | | | Change-Id: If6ec32dc3105b3498eef8a20e8f464a85f1ee891 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Merge remote-tracking branch 'gerrit/btle' into devAlex Blasche2016-08-032-12/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | Merges Qt Bluetooth Low Energy port on WinRT into mainline. Change-Id: Ic519955dfee4a57635c525a79b900340fbc5562f
| * \ \ Merge remote-tracking branch 'gerrit/dev' into btleAlex Blasche2016-07-132-0/+85
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the minimum compile requirements for the new QBluetoothDeviceDiscoveryAgent API. Change-Id: Idfe07bee63de9d2849ab68eb455d0be470591795
| * | | | tst_qbluetoothdevicediscoveryagent: Fix condition for WinRTOliver Wolff2016-05-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If3535ad72e0701fc2edc5aae536a3e99ccc11a49 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * | | | tst_qlowenergycontroller: Fixed conditions for WinRTOliver Wolff2016-05-311-9/+9
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WinRT has similar restrictions as IOS in several areas like no access to local adapter data. Conditions have to be adapted accordingly for the auto test. Change-Id: I8a58386c3afaccc705a4c86ba24ceb6dc36a72ab Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | | QBluetoothDeviceDiscoveryAgent::DiscoveryMethod - autotestTimur Pocheptsov2016-08-011-0/+130
| |/ / |/| | | | | | | | | | | | | | | | | | | | Add an auto-test for the recently introduced discovery methods. Task-number: QTBUG-46253 Change-Id: I264e0a0623284d329e18e30cf517cd1278693c44 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Add unit test for QBDDAgent::setLowEnergyDiscoveryTimeout()Alex Blasche2016-07-082-0/+85
|/ / | | | | | | | | | | Task-number: QTBUG-53012 Change-Id: I8910986ac3bc51cabc37aa509ef395972d88a7c5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Merge remote-tracking branch 'gerrit/5.6' into 5.7Alex Blasche2016-05-231-2/+2
|\| | | | | | | Change-Id: I33cfb293df15c82247561d3540a4513cdf63b910
| * tst_qlowenergycontroller.cpp: Fixed typoOliver Wolff2016-05-201-1/+1
| | | | | | | | | | Change-Id: Ib6dc3ae3237f4dfcb158f053276ffc4e378acf43 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * tst_qlowenergycontroller: Fixed condition for IOSOliver Wolff2016-05-201-1/+1
| | | | | | | | | | Change-Id: I92e3b8f6b3a9a80d0e59040e15c60062e1f49cc2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Fix endianness conversion order bug when handling 128bit Qt UuidAlex Blasche2016-05-182-9/+49
| | | | | | | | | | | | | | | | | | | | QBluetoothUuid.toUInt128() always returns big endian notation. We have to convert it to host order before we convert to Bluetooth order. Task-number: QTBUG-53421 Change-Id: Ibab4f06fa70739adb163523c803a203608454427 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-2/+1
|\| | | | | | | | | | | | | Conflicts: examples/nfc/corkboard/corkboard.pro Change-Id: I5d1ea0a8e21a1b55dbf744c2f4b469bc51f05c7a
| * Peripheral Privacy Flag (0x2A02) may not be writable on some platformsAlex Blasche2016-04-271-2/+1
| | | | | | | | | | Change-Id: Ic80fe48fb192ee66f87aabcebc2b84e4ed3049a0 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Remove the traces of the discontinued android-no-sdk platformEirik Aavitsland2016-04-292-2/+2
| | | | | | | | | | Change-Id: I0358b76dd2b9fb2a6224c4b9b2082a748b2d5d7a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Fix QLEServiceData comparison operator inconsistencyAlex Blasche2016-03-091-0/+14
| | | | | | | | | | | | | | | | The comparison operators usually have const& parameters. Change-Id: Ibd8e7d1fe5704b4de3a0bfabe1bbc991411eecba Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Bluetooth LE: Add support for Signed Write command in the central role.Christian Kandeler2016-02-172-6/+52
| | | | | | | | | | | | Task-number: QTBUG-41175 Change-Id: I62d74236faf9161681306d952e409e23e0cea24d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Fix undefined behavior in AddressInfo's default ctor.Alex Blasche2016-02-111-0/+5
| | | | | | | | | | | | | | The AddressInfo::type member was not properly initialised. Change-Id: I79c8e1d00d4cb03e3d073a23bb4dbf6b9d510b7c Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Bluetooth LE: Fix two list setter functions.Christian Kandeler2016-02-091-0/+8
| | | | | | | | | | | | | | | | Adding the new list elements is all well and nice, but we have to clear the existing ones first. Change-Id: I1b044f2ea86a4a300bde93535a944c18328aa805 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Bluetooth LE: Add configure test for Linux crypto API.Christian Kandeler2016-02-092-2/+4
| | | | | | | | | | | | | | These files were forgotten in commit c516f6157a. Change-Id: I87bd57545b8873fc0aa00751058be604588daffe Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Bluetooth LE: Add support for Signed Write command.Christian Kandeler2016-02-033-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This is how we get at the signature resolving key: 1) On connection from a client, we read the key from the respective BlueZ settings file (BlueZ 5 only, as I did not manage to find out where BlueZ 4 keeps this information). 2) Also monitor the HCI traffic for key updates (due to re-pairing). - While there is an autotest for the actual hashing procedure, the overall feature cannot be easily tested for various reasons (there is no signed write support in our client API, for one). However, to help with manual testing, the server part of our autotest now exposes a characteristic that supports signed writes. - This feature requires a Linux kernel >= 3.7. Change-Id: I7ede9b430de167fe1f4519eedf8670d88d79aa25 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>