summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Enable bttestui to test QBluetoothSocket::bytesWritten() signalAlex Blasche2019-04-011-0/+6
| | | | | Change-Id: Id29865014043963f7edf22cc81a2bd7a91c55a60 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* 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>
* 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.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>
* | 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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-065-5/+9118
|\| | | | | | | | | | | | | 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>
| * bttestui is a classic Bluetooth example - no need to do BTLE searchAlex Blasche2017-06-141-1/+1
| | | | | | | | | | | | Change-Id: I02c3ffe517edd43624a743818dc98c5ca8135f31 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Adjust bttestui to Android's SDP discovery problemsAlex Blasche2017-06-142-1/+17
| | | | | | | | | | | | | | | | | | This affects only Android version 6.0.1 or later. At this stage there is no available fix yet. Task-number: QTBUG-61392 Change-Id: Ib63a1974fd0a0533624608df0ebd4c4202a80658 Reviewed-by: Oliver Wolff <oliver.wolff@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>