summaryrefslogtreecommitdiff
path: root/tests/manual
Commit message (Collapse)AuthorAgeFilesLines
* Link applicable manual tests against permission plugin on macOSJuha Vuolle2023-04-042-0/+15
| | | | | | | | | | As a temporary workaround (see QTBUG-112212) Task-number: QTBUG-112215 Task-number: QTBUG-112212 Change-Id: Iae6f94e4d208e829993a0af136d21522ca819eb1 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Fix btscanner manual test to work on macOSJuha Vuolle2023-03-271-30/+26
| | | | | | | | | | | | | | | Because it's a manual test now instead of an example, use qt_internal_add_manual_test. Remove the code bits that were needed for examples. Enable uic. Manually link to the darwin permission plugin because that's not done automatically for tests yet when targeting macOS. Pick-to: 6.5 6.5.0 Task-number: QTBUG-104754 Task-number: QTBUG-112212 Change-Id: Id4176f60118a4d3dcca96df56d53f9243a50174d Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* BtScanner example: move to manual testsIvan Solovev2023-03-2111-0/+669
| | | | | | | | | | | | | | | | | | | | | | | The example mostly shows the usage of QBluetooth{Device,Service}DiscoveryAgent classes, which is also illustrated by other examples. Move it, because it's not fully functional on mobile platforms (because it's widget based). Do not remove it completely, because it might still be useful for doing Classic device scan. Also implement some improvements while on it: * fix CMakeLists.txt by using qt_standard_project_setup() and PRIVATE linking * fix memory leak in DeviceDiscoveryDialog * rework the code to use Qt parent-child model instead of manually deleting objects where possible * fix includes * fix forward declarations Task-number: QTBUG-111972 Pick-to: 6.5 6.5.0 Change-Id: Ie4bc9e25ccdda6d5f5de2f57528df349c71cdc12 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* Update the remaining (manual) tests to use the Permissions APITimur Pocheptsov2023-03-032-0/+51
| | | | | | | Otherwise, they will refuse to work with Bluetooth. Change-Id: Iaf5c6726b609a280e0611cfecaea485ccfa38804 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove flaky part of the Bluetooth MTU manual testJuha Vuolle2023-01-191-5/+0
| | | | | | | | Previously this has been flaky at least on Darwin, and now also on Android 13. Change-Id: Ibb47850569e5b6c7af5f5149c0041c9df8a72045 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Android LE Peripheral: properly update characteristic and descriptor local ↵Ivan Solovev2023-01-183-0/+203
| | | | | | | | | | | | | | | | values Android backend did not update the serivice's characteristic and descriptor values after executing writeCharacteristic/writeDescriptor. As a result, the connected central saw the correct updated value, while local request still returned the old value. This patch fixes it by properly updating the local values when the write operations complete successfully. Pick-to: 6.5 Change-Id: Ie09299b6c72bbf92ab6c824c3ca23f0136f0457e Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* Improve bluetooth manual test supportJuha Vuolle2022-12-071-13/+72
| | | | | | | | | | | | | | | This is a preparatory commit for adding the Bluez DBus peripheral role support. Aim is to improve the manual test coverage: add large descriptor writes, ability to set advertising data multiple times, add more services, characteristics etc. Also adjust the large attribute size so that it works with bluez dbus. Task-number: QTBUG-107510 Change-Id: I5f22880349606feb4f61032b78c62b990329eb69 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add Android support for BT LE RSSI readJuha Vuolle2022-09-131-4/+126
| | | | | | | | | In addition add manual and autotest support Fixes: QTBUG-69747 Change-Id: I253b8ea7d3dd5b3e2dce65b83c31363673c931b8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add tst_qlowenergycontroller_device::testRepeatedCharacteristicsWrite()Ivan Solovev2022-08-261-0/+83
| | | | | | | | | | | | | | | ... and its counterpart in bluetoothtestdevice. The client side generates multiple writes to the same characteristics. The server side, when receiving each new value, copies it to the notifying characteristic, which sends notification back to the clien. In this way the client can verify that all writes were completed successfully and in the right order. Fixes: QTBUG-105556 Pick-to: 6.4 6.3 6.2 Change-Id: Id5ba5b00527a01903b3730733188065c1cc6a94e Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
* Bluetooth Windows: refactor getNativeCharacteristicIvan Solovev2022-08-261-2/+6
| | | | | | | | | | | | | | | | | | | | | ... to get rid of await() call. The function now requests the characteristics asynchronously and executes a custom callback, passing the selected characteristic as a parameter. After that the refactoring is quite simple: we put all the code after the getNativeCharacteristic() call into a lambda, and pass this lambda as a last parameter of the updated method. As a drive-by: improve tst_qlowenergycontroller_device::testNotificationAndIndication() stability by adding QTest::qWait() calls after disabling notification and indication, like it is done in other places. Task-number: QTBUG-105556 Pick-to: 6.4 6.3 6.2 Change-Id: I1164bbc677d3549ef930243fd645eed344e27b7c Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-232-2/+2
| | | | | | | Task-number: QTBUG-105718 Change-Id: I8df2954bb61e0dc2a89f48c056b10a4bab395e0b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for tests and test helpersAlexandru Croitor2022-07-271-1/+1
| | | | | Change-Id: I178b945cfc563bc3e0c9c01c63f54f0cba4552d9 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-082-0/+6
| | | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: Ic31d264037cb00d72436d585820e45e4ccac5c60 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-101-27/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Ifc22d8ae24532e9a1093ca613ed6590a1992bc39 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Tests: Use REQUIRED COMPONENTS where applicableKai Köhne2022-05-131-1/+1
| | | | | Change-Id: I86a47d41ec14182303c93dd665d170d0bff94ac9 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Port simple cases of count() to size()Marc Mutz2022-04-111-10/+10
| | | | | | | | | | | | | | | The count() methods on QByteArray and QString are deprecated. The ones on other Qt containers will likely follow soon, so port them all to size(). The changes which also require int -> qsizetype will come in a follow-up patch. Pick-to: 6.3 Change-Id: I23e364019b9cfc457d93f4a3bb4660fe8d790da8 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Replace count() comparisons against 0 with isEmpty()Marc Mutz2022-04-081-1/+1
| | | | | | | Pick-to: 6.3 Change-Id: I0a14c1737cda87fa30d207bdf5b2a697214b7e70 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix memory leaks in tst_qlowenergycontroller_deviceIvan Solovev2022-01-281-21/+21
| | | | | | | | | | QLowEnergyController::createServiceObject uses 'new' to create an instance of QLowEnergyService. Wrap the pointers returned by this method into QSharedPointer to prevent memory leaks. Change-Id: If90a3155a782a78864e31d55a9ce54dfe84320be Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Re-enable BT tests on macOS and add appropriate Info.plistJuha Vuolle2021-12-223-61/+4
| | | | | | | | | | | | | | | The custom Info.plist is needed to run the tests on macOS 12+ If the bluetooth adapter is OFF (as it is in CI) the tests pass fast. If the bluetooth adapter is ON there is one fail that will be addressed with another task (QTBUG-98955). In addition fixed one invokeMethod error which the testing revealed. Pick-to: 6.2 6.3 Task-number: QTBUG-99222 Change-Id: Ia9fb10f0c3d00f5519fafc56234dcaacbb8013e8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Adjust BT LE test to pass with most client-server combinationsJuha Vuolle2021-12-152-13/+65
| | | | | | | | Pick-to: 6.2 6.3 Task-number: QTBUG-98781 Change-Id: I97f365136000cf5d9d10e8d5e3e69c56654e28a3 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add server platform identification support for BT LE manual testJuha Vuolle2021-12-061-5/+56
| | | | | | | | | | | | | The BT LE support differs slightly on different platforms on the server side. This commit adds the means to adjust the BT LE client-side expectations depending on which platform the counterpart server is running on. Task-number: QTBUG-98781 Pick-to: 6.2 Change-Id: Ia30afb2ba2256595cd5556bb417f9542ecb0b06c Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add Info.plists to BT LE test components on macOS and iOSJuha Vuolle2021-12-063-0/+75
| | | | | | | | | | | | | Make it possible to run the BT LE test on macOS/iOS. "bluetoothtestdevice" is a BT LE server and "tst_qlowenergycontroller_device" is a BT LE client counterpart. Pick-to: 6.2 Task-number: QTBUG-98781 Change-Id: Id5deb184398c9ea4e5b84555f33c9beb0c2459c0 Reviewed-by: Tamas Martinec <tamas.martinec@symbio.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add manual BT LE testAndreas Buhr2021-11-103-0/+621
This patch adds a unit test which tests various BT LE features. The test assumes to find a device running the "bluetoothtestdevice" BT LE server from this same repository. Finding/matching the server device is based on the BT LE name which can be provided by an environment variable or by hardcoding it in the testcase code. Pick-to: 6.2 Change-Id: I1c6a1bad168066d274c95e6f2cafb3ef5f9b48c1 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>