summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* | Fix typo in error messageDominik Holland2019-04-231-1/+1
| | | | | | | | | | Change-Id: Idff669c1ced1d4f3b347bf042eefae3905f882bb Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Remove the deprecated QIviProperty* classesDominik Holland2019-04-017-770/+0
| | | | | | | | | | | | | | | | The classes have been deprecated already for some time, so it should be fine to remove them now. Change-Id: I3f92f7091433d9775e722effd9671cdd7a75a884 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Remove the QtSimulator integrationDominik Holland2019-04-019-132/+1
| | | | | | | | | | | | | | | | | | | | This removes the QtSimulator code in the autogenerated simulator backends and the control_panel template. The simulation can now be scripted using the QIviSimulationEngine. Change-Id: I40330e9454f700278cbf6ac960f602385642b524 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Add support for pending server repliesDominik Holland2019-04-017-18/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default QtRemoteObjects always wants to return a result for a function call right away. For function calls which take longer this doesn't work very well as the Qt main event loop is blocked until the result is ready and in the meantime no other communication can take place. This commit introduces a workaround for this limitation by generating a interface specific PendingResult object which can be returned as a placeholder to inform the client that the result is not yet ready. The actual result is emitted by the server using the pendingResultAvailable signal with the call-id and the result. To also support returning the result right away the return value always needs to be of type QVariant. This also has the good side effect that the client side always gets informed of whether a call has been finished or not as QtRemoteObjects doesn't provide QRemoteObjectPendingReply<void> for this. Change-Id: I68bf29b84b95042b69b5e1a18096f48ee9da7c7c Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Add model support to the "backend_qtro" templateDominik Holland2019-03-148-2/+214
| | | | | | | | | | | | Fixes: AUTOSUITE-599 Change-Id: I45e8a00146556b0df159479f703e4bf74cf0c9c6 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Support zoned interfaces in the 'backend_qtro' templateDominik Holland2019-02-278-55/+885
| | | | | | | | | | | | Fixes: AUTOSUITE-585 Change-Id: I0d8fba5766963cd54e78a455b6476eed58afb96c Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Fix code style in QtRemoteObjects autotestDominik Holland2019-02-272-35/+35
| | | | | | | | | | Change-Id: If01898504c4c08e70faa7f3d34660ad7bc3021e6 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Refactor the qtro_backend implementationDominik Holland2019-02-271-2/+28
| | | | | | | | | | | | | | | | | | | | | | Move the replica connection to the constructor and make sure the initialize() function emits valueChanged functions only when the replica is already initialized, otherwise it relies on the replica to emit the changes when it's done initializing the values. Change-Id: Ife3664e174d0d6697337ea1c48a1e9423b38b755 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Improve the QtRemoteObjects autotest of the ivigeneratorDominik Holland2019-02-262-19/+24
| | | | | | | | | | | | | | | | | | | | | | Make sure the QSignalSpys are created before the signal can be emitted the first time. Added a small delay after startup and shutdown of the server to give QtRo enough time to notify all Replicas. Change-Id: I7e5187577c40e83c8d3ab0c52a0109b4aedc0a61 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Properly support the datatype 'var'Dominik Holland2019-02-155-14/+22
| | | | | | | | | | | | | | | | | | | | | | Some checks in generate.py where wrong and cause pythong exceptions. In addition some more conversion logic is needed to make sure most types can also be handled from the yaml files. Added the type to test qface files. Change-Id: I72c9043102b958afa946b93cfcf4e9bbe8422aef Fixes: AUTOSUITE-769 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Don't use the javadoc syntax in our qface filesDominik Holland2019-02-113-48/+24
|/ | | | | | | | | | | | In theory the documentation inside the qface files could be transformed using the javadoc syntax and the parse_doc filter function, but so far we only supported the brief tag and already used qdoc commands in the function directly. As the tag functionality of parse_doc is nothing we can really use, better use qdoc commands in the qface documentation right away. Change-Id: I9b23fe84acc6cd942e6fa7ec5933911b84ce22ec Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Fix the flaky QIviSimulationEngine autotestDominik Holland2019-01-171-2/+2
| | | | | | | | only expect two signals in the animation test (one intermediate value change and the final value change) Change-Id: I85e6f87ed242935c6cfc7ed0a088862e1392b07d Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Fix a crash in the QIviSimulationEngine when using animationsDominik Holland2019-01-121-0/+38
| | | | | | | | | | The code handles now read and write of properties using the staticMetaObject correctly. Added more internal documentation for it and a autotest. Change-Id: Iddceeebcf5317ddb3a6986d82febc81bd374b575 Fixes: AUTOSUITE-727 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Update copyright statementsRobert Griebl2018-12-1733-2/+35
| | | | | | | | - added 2019 - everything is (c) Luxoft instead of Pelagicore from now on Change-Id: I4a6dbd46aaffbb90cea57626bd75e3972cea2cfc Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Clang-tidy and Clazy fixesDominik Holland2018-12-052-3/+3
| | | | | Change-Id: Id88db48e0e18761a9bc1b1014628bf0099c4e5cf Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Change the zone annotation to be a list instead of a mapDominik Holland2018-10-261-1/+1
| | | | | | | | This makes the annotation and the template code much easier and the annotation more intuitive to read and write. Change-Id: If59b6aac6259e9d98b090a5d7a1831f3d55acb1a Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Add an autotest for the QIviSimulationEngineDominik Holland2018-10-153-0/+883
| | | | | | Task-number: AUTOSUITE-626 Change-Id: Idccf6b55c67ee046c013d6f4556d0b96e7dbac65 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Fix the flaky tst_echoqtro autotestDominik Holland2018-10-111-44/+35
| | | | | | | | | | Don't hardcode the wait time for the signals to 1000 msec. Instead only call wait when needed and use the default of 5000 msec. This should give the test enough time also on slower systems. Change-Id: I48ec9ab3d9c92c677965f05e92b70b935c1f3ff0 Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
* Merge remote-tracking branch 'origin/5.11' into devDominik Holland2018-09-274-4/+4
|\ | | | | | | Change-Id: If48055bb577b4b59a836b2c4a00d940401b97c6a
| * Use the full module uri for the class export macroDominik Holland2018-06-084-4/+4
| | | | | | | | | | | | | | | | | | Using the full uri makes it more unlikely that the export macro names clash with the export macro of an library with the same name. Task-number: AUTOSUITE-509 Change-Id: If5d66f7dc4d7e3e8edc4cbede1d2dfcbaad3b1d7 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>