summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Remove QMake project filesDominik Holland2021-06-0224-421/+0
| | | | | | | | | This includes removal of the corresponding .prev_CMakeLists.txt files. Keep the pro files in the ivigenerator autotests. Task-number: QTBUG-88742 Change-Id: Idbf40dc5f6469dbea37126ea9b46a6d521f43139 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Update copyright headers to 2021Dominik Holland2021-06-0239-386/+416
| | | | | | | Also removed all the SPDX tags and -QTAS license extensions. Change-Id: I06802ea7b48ad749db3a696e9ec598b4aec6892c Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* ivigenerator: Remove the "Module" postfix in the autogenerated classesDominik Holland2021-05-2811-124/+124
| | | | | | | | | | | | | | | The module class which is autogenerated by the ivigenerator always got a postfix which was used to prevent compilation errors when module and interface had the same name. As we don't use any extra postfix for structs or interfaces either the "Module" postfix is now dropped as well and the module should rather be renamed already in the IDL file instead. Change-Id: I91bf95e824436e65e374aaf397ecd5c548444589 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Robert Griebl <robert.griebl@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* CMake: Disable usage of CMake API compatibility wrappersJoerg Bornemann2021-05-2620-22/+22
| | | | | | | | | | Setting the QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS variable in the project ensures we ported away from old API calls. Task-number: QTBUG-86815 Change-Id: I7f86da0411b4870b1a9f9e1ed0b63cf30ccd48ad Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* cmake: Enable all autogenerated autotests againDominik Holland2021-05-2517-79/+85
| | | | | | Change-Id: I727c5fcc7db89a1e24912d5ade61ca5a7e613543 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Rename the org-example-echo-noannotation autotest to workaround path limitsDominik Holland2021-05-2017-5/+5
| | | | | Change-Id: I60ab3e673617ce78091dfbf23c1d409aa8f632e5 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Enable the QtRemoteObjects supportDominik Holland2021-05-209-223/+20
| | | | | | | | Similar to the previous commits, the examples and tests build ok, but are not yet ready to be used and still need to be refactored. Change-Id: Icb4482696e81a5a17b89622182053c5cfcb5fc7b Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Remove 'virtual' keyword when overriding methodsDominik Holland2021-05-201-8/+8
| | | | | Change-Id: I7d124886c71093d2fc8405a7ec4157464e3c3333 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* cmake integration of the ivigeneratorDominik Holland2021-05-1034-531/+898
| | | | | | | | | | | Rerun pro2cmake.py for all examples and tests. Ivigenerator based tests and examples are compiling fine, but the cmake files need to be reworked to be also able to run them. Task-number: AUTOSUITE-1633 Change-Id: Icb95ecfa62ecb319d042dc30ea9f643b69a4aacf Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Fix missing override keywords backend pluginsDominik Holland2021-05-108-24/+24
| | | | | Change-Id: I87e69d96d9c1234bc89b923811da912055d5bfc0 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Fix failing autotestsDominik Holland2021-03-262-1/+4
| | | | | | | | | | | Fix the CMakeLists.txt of servicemanagertest to also link the static_plugins. Fix the qiviqmlconversion_helper to not convert strings to char arrays. Adapt servicemanager autotest to ignore some features which doesn't work yet with cmake. Change-Id: I5b0ff928003858a304a8dc97978a33abf685883d Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* cmake: Add configure test for DLT and fix building GeniviExtrasDominik Holland2021-03-262-3/+3
| | | | | | Task-number: AUTOSUITE-1633 Change-Id: Icf2117f9772dccff871c7fa9307479c2488f3965 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* cmake: Start of cmake port using run_pro2cmake.py and friendsDominik Holland2021-03-2652-0/+1116
| | | | | | | | Some special cases are already addressed. Task-number: AUTOSUITE-1633 Change-Id: I5409522c1c5eb76b8aac3e7e332d1e1cc27e594f Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Add support for custom filters per templateDominik Holland2020-12-142-0/+54
| | | | | | | | | | | | | | | If the ivigenerator finds a filters.py file within the currently used template folder, this filters.py is loaded in addition to the already registered filters from the ivigenerator. It is also possible to import the original ivigenerator python files from the custom filters.py and reuse existing functionality. Fixes: AUTOSUITE-860 Change-Id: I7769255f1d55353a940347bab18b6b327214bb96 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Qt6 port without cmake supportDominik Holland2020-12-024-22/+19
| | | | | | | All deprecation warnings fixed and all autotest pass. Change-Id: I05d48e9ddd2bf23b900065726d67710eea0e82d0 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Use the DiscoveryMode enum correctly in all our QML filesDominik Holland2020-12-021-1/+1
| | | | | | | | Similar to C++ we need to use the Type where the enum is defined in for assignments. Change-Id: Id491d591d97915452ebcff8a7f47360be4e2340a Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* tst_qiviabstractfeature: Fix return value of autotestDominik Holland2020-12-021-3/+3
| | | | | | | | The test wasn't failing, if only one of the two classes in their had a failing autotest. Change-Id: Ia1c5d92628373ed516524bc9a29a76d45185e995 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* geniviextras: Fix dlt autotest to use a char array as payload storageDominik Holland2020-12-021-2/+3
| | | | | Change-Id: I5214b98f73416d69a984c9d7e3a547c9d9d2dc9d Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devDominik Holland2020-07-071-1/+4
|\ | | | | | | Change-Id: I4844aa74bb361610dfff6e381b5a7f68cd990044
| * tst_qiviabstractfeature: Fix wrong QML test case5.14Dominik Holland2020-04-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The autodiscovery QML test is trying to set the discoveryMode from Javascript and rediscover manually. Because of QTBUG-83703 the QML code is wrong and is only working because of the previous registration of the Feature using the same name. In Qt6 this won't work anymore and the QML code needs to be fixed to use the original enum. Change-Id: If52c370403958cb86c80d5952bf1efc7cd001dc8 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* | tst_qivisearchandbrowsemodel: Build fixDominik Holland2020-04-271-0/+33
|/ | | | | | | Implement our own QVariant < and > operators for the autotest Change-Id: I61cddd638610340eede4ae64b12c2fae983f30d2 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* ivigenerator: Improve support support for zoned default_value dataDominik Holland2020-04-021-12/+35
| | | | | | | | | | | | When creating the simulationData for structs the zoned values where ignored and always ended in qface errors. The filter function which generates the simulationData is now able to handle those zoned values as well and they are now also part of the autotests. Change-Id: Ie097b1cba2498d0d1e61fb0524548869c2c96502 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Improve the flaky tst_qivisimulationengine autotestDominik Holland2020-04-021-1/+1
| | | | | Change-Id: I6a7a3d2d588674a50ff74fecc49c538e68e37adc Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* tst_qivipendingreply: Fix flaky testFailed_qml()Dominik Holland2020-04-021-2/+2
| | | | | | | | | Instead of waiting for 100 miliseconds hardcoded we now use a signal spy and increase the wait time to 1000 miliseconds. This should give the test more time if needed. Change-Id: I0cff87cf47bd041664fddc4a602a80055ec9df71 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Dominik Holland2020-03-021-17/+19
|\ | | | | | | Change-Id: Icbc626704f0cb12f84774a717e7050487a74af9c
| * Fix registering the QIviPendingReplies at startupDominik Holland2020-01-201-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | Using a singleShot timer is not the right way as it doesn't make sure the call is really executed in the next event loop run. Instead use QMetaObject::invokeMethod(). Also reorder the qivipendingreply autotest to make sure the QML test is done first, which needs the types to be registered... Change-Id: Id4f8dd1577e653c99fd82e8ab8f93a848f9b1b79 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* | simulation: Fix struct initialization using JSON dictionariesDominik Holland2020-01-211-0/+2
| | | | | | | | | | | | | | | | | | | | Instead of using a list of values to fill all members, it is also possible to use a dictionary, which is more expressive. This fixes the conversion function and adds an autotest for it. Change-Id: I7b817a26622f95c7e9fe4d3ff853310c5ad87f32 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* | Improve test coverage of the simulation engineDominik Holland2020-01-219-1/+604
| | | | | | | | | | | | | | | | | | | | | | | | This adds tests for the parsing and overriding simulation data, as well as tests for intepreting the values using the QIviSimulationGlobalObject. It also fixes the bugs find while writing these tests. Change-Id: I76269198523f9c75eefb9a9dbc5244e682e4a9f0 Fixes: AUTOSUITE-1381 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Dominik Holland2020-01-171-0/+8
|\ \ | |/ | | | | Change-Id: I0a79176763ca001072d41f377869854e1982e4e7
| * ivigenerator: Use QStringLiterals for string default_valuesDominik Holland2019-11-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For default_values in our simulation backends, QLatin1String() were generated so far, but when using these for initializing a struct with only one string property, this caused problems, as the structs are using QStrings and because of an additional QVariant constructor this caused some ambiguity for the compiler. Switching to QStringLiterals fixes this problem, as the QString constructor is used in this case. Change-Id: Iae34ef290ec5683665fdfdb75b633e748ee371f3 Fixes: AUTOSUITE-1340 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* | ivicore: Discover new plugins at runtimeDominik Holland2020-01-081-36/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the QFactoryLoader the QIviServiceManager now also supports adding new library paths after the service manager has been instantiated for the time. This is especially need for the QtApplicationManager in-process runtime as it shares the QIviServiceManager from the system-ui with the in-process apps and before there was no way the application could ship their own plugins. Change-Id: I02e7be894969993861dbe484f6358525a7e990ee Fixes: AUTOSUITE-1225 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* | Fix all plugin class names to be unique within the moduleDominik Holland2019-10-309-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | The plugin class name is used to instantiate the plugin when used as static plugin and also defines the name for the cmake files to include those plugins. Using the same name sometimes caused build errors when generating the same cmake file. Change-Id: I28e6b83148d14265fb74690d2b912628446301eb Fixes: AUTOSUITE-1322 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* | ivigenerator: Add support to import other modulesDominik Holland2019-10-2912-1/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When importing another module from within a QFace file, the generator now searches within the QFace import path. If this module is found, the information is then used to generate code that includes types from this module. The QFace import path can be set in the autogenerator similar to qmlscene by using the -I option; in qmake it can be set using QFACE_IMPORT_PATH. The generator makes sure to generate correct code, but the developer still needs to setup the .pro files correctly to add the imported module to the INCLUDEPATH and also link to the generated library. Fixes: AUTOSUITE-1158 Change-Id: I0e9fa714d4c893a4bf17c5f7db34c62d84932c94 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* | ivigenerator: Properly support models in zoned interfaces part 2Dominik Holland2019-10-292-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes the way how the QtRo Adapters and wrappers are created. Previously the replica names for the adapters were hardcoded into the wrappers. The new way is to ask the adapter for the replica name and make this name part of the adapters constructor. To make this easier the adapter also gets a enableRemoting() function which does the remoting with the correct wrappers and also makes sure all model properties and all zoned model properties are remoted correctly. For this new way also the QIviPagingModel needs an adapter, which is why it was moved into the helper library. Change-Id: Ibb7f2c282d334a2601bd803a92ff71c2e8b2fd32 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* | ivigenerator: Remove the generation_validator templateDominik Holland2019-10-156-55/+0
| | | | | | | | | | | | | | | | | | This template is still from the early days before the auto test template existed. As the autotests make sure the auto generated code works as intended, this feature is not needed anymore. Change-Id: Id0f0b5ccf42678e42abba924e65eaf27ed6d754e Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* | Fix compliation warningsDominik Holland2019-10-101-3/+3
| | | | | | | | | | Change-Id: I4f08874c33adce225f5425bc57fe0fb55b5ddd39 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* | geniviextras: Add better handling for long messagesDominik Holland2019-10-101-14/+120
|/ | | | | | | | | | | | DLT silently drops too long messages and produces empty lines instead. This changes introduces a behavior enum which helps to configure geniviextras to truncate or split the long messages. Change-Id: I325c8e8da25c9456ee56d29bce0779b016c01917 Fixes: AUTOSUITE-1187 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* ivigenerator: Fix the 'server_qtro_simulator' template to handle ↵Dominik Holland2019-09-121-0/+2
| | | | | | | | | | | | 'getter-name' correctly The underlying QtRO transport doesn't allow us to define the getter or setter names for the property, that's why we need to use the property name when deriving from the autogenerated source classes. Change-Id: I417e85af5460d51fab9964fc163279e5eea3afe1 Fixes: AUTOSUITE-1242 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* ivigenerator: Support enums and flags as return values of operationsDominik Holland2019-08-286-0/+79
| | | | | | | | | Also add a generation test, as well as as testing the functionality using QtRO. Change-Id: I9a26ca595fdb9e8522fd3cc01d0b7337e86a1dad Fixes: AUTOSUITE-1190 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Merge remote-tracking branch 'origin/5.12' into 5.13Dominik Holland2019-08-271-1/+3
|\ | | | | | | Change-Id: I091bb051fb74b4615daeb234dc8982449ab6cd6c
| * Fix build to work without the QtGui moduleDominik Holland2019-07-081-1/+3
| | | | | | | | | | | | | | | | Tests are skipped in this configuration because a lot of tests rely on QtQuick being available. Change-Id: I1a1661474f9279f2a8f7c3de24786629e73f75a4 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Add support for custom templatesDominik Holland2019-08-016-1/+176
| | | | | | | | | | | | | | | | | | | | | | | | The support for this was already partially available, but some checks in the prf file as well as a limitation in generate.py prevented this to be usable. Also add a autotest for this to keep supporting it in the future Change-Id: Iee0b7593d788d4ee30d3483ceaa141439f93a2c4 Fixes: AUTOSUITE-1162 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Add the 'qmlplugin' template to the ivigenerator generation testsDominik Holland2019-06-116-0/+40
| | | | | | | | | | Change-Id: I638092b79abe931a5b4601cdc2236903c561444d Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
* | Correctly emit change signals when clearing the ServiceObjectDominik Holland2019-06-112-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | When the serviceObject of a feature is set to null, the feature is responsible to reset its state to the default again. This commit will make sure that not just the state is fixed, but also reflected to the outside by emitting the change signals. Task-number: AUTOSUITE-1000 Change-Id: I4bc696f0179975a2d719ad420718b574010f5a5e Reviewed-by: Kavindra Palaraja <kpalaraja@luxoft.com> Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Improve the ivigenerator test coverageDominik Holland2019-05-145-0/+58
| | | | | | | | | | | | | | | | Also use the 'backend_qtro' and 'simulation_server_qtro' in the autotest to make sure they generate buildabe code, with and without annotations. Change-Id: I028a52ea42812d827e23a43292b6f0f9c162b02a Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Add a autotest which tests the generation without any annotationDominik Holland2019-05-148-0/+201
| | | | | | | | | | | | | | | | This should make sure the annotations are optional and the templates provide a working default implementation. Change-Id: I1ec3b655b9d5c24e839bfea4c4bf1c674839b10d Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Use the same qface test file also for the QtRemotObject based autotestsDominik Holland2019-05-1411-191/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure our templates support all tested types and generates code which works as expected. This already showed a problem when serializing a QFlag property (QTBUG-75676), which gets fixed by registering a conversion function for our flags in the autogenerated code. Change-Id: I48e4c0a3ca5f98bdc45f3d7d6b83d88c1ae56c2c Fixes: AUTOSUITE-794 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Introduce a internal QtRemoteObject helper moduleDominik Holland2019-05-143-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This module provides helper functions when using QtRemoteObjects and starts using it in the autogenerator templates and the handwritten servers. The helper provides the following: * generic error handling * conversion from QIviPendingReply to a pending call on the source side * conversion to QIviPendingReply on the replica side Change-Id: Ic9030c89b8153626340cc786d97ecdae416e699d Fixes: AUTOSUITE-929 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Refactor the QIviSearchAndBrowseModelInterfaceDominik Holland2019-05-081-54/+41
| | | | | | | | | | | | | | | | | | The refactoring is needed to better support async backends e.g. QtRO. Change-Id: I10d8e9fd34afb05443d8ebdeb225385178e9b88f Fixes: AUTOSUITE-928 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Make the QIviQueryTerm and QIviOrderTerm classes serializableDominik Holland2019-05-071-0/+11
| | | | | | | | | | | | | | | | This is needed to make a full featured generic async backend for the QIviSearchAndBrowseModel. Change-Id: Ifcbd6d86d45348f92427c78ce8ce48a918beeb6a Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>