summaryrefslogtreecommitdiffstats
path: root/tests/auto/installer/cliinterface/tst_cliinterface.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CLI: Add support for additional filtering of search resultsArttu Tarkiainen2021-04-091-0/+18
| | | | | | | | | | | | | | | | | | Search command results can now be optionally filtered with the '--filter-packages'-option, which takes an unspecified count of key-value pairs that contain the desired package information element and a regular expression used to find matches in the element. Example usage: 'installer --fp "Version=1.0, Description=Some text" search *' Only the packages which match all given filter rules are included in the output print. Task-number: QTIFW-2168 Change-Id: I788b065d95952b988489c36db80b3c859b970f05 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* CLI: improvements to 'search' and 'install' command outputArttu Tarkiainen2021-03-111-1/+15
| | | | | | | | | | | | | | | | | | | | | | Previously subcomponents of a virtual component were shown on search results, and trying to install these would print a bit vague message: 'Component not found'. As the sub-branches of virtual component nodes are hidden on GUI, we should also hide them when using CLI search, and give a more appropriate error message why the component cannot be explicitly selected for installation, if the user still tries to do so. Also some minor refactoring to the handling of supplemental information about binary type of the running installer/mt. This change does not fix the possible case of an install script changing the 'virtual'-state of a component, as it would require downloading and evaluating the full metadata for repositories (or components), which would impose a performance penalty to search. Task-number: QTIFW-2168 Change-Id: Ibacaca23c38f5ea98967955d91849cefc1f11f61 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add unit tests for offline generationArttu Tarkiainen2021-02-161-5/+5
| | | | | | | | | | | | This also changes some of the return values in our CLI-related functions in PackageManagerCore class to better catch cases where we exit without failing but also without doing anything. Also adapt existing tests. Task-number: QTIFW-2028 Change-Id: I73c4ca1b20d439773d0e290195f137d0d7369d17 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add support for generating offline installer from onlineArttu Tarkiainen2021-01-151-4/+4
| | | | | | Task-number: QTIFW-1945 Change-Id: Ic8a076a28385e99ad09cfbccd07c7012d6570639 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Print package information in xml formatKatja Marttila2020-11-251-22/+38
| | | | | | | | | Also removed logging categories for package information, the full package information can be printed by increasing the verbosity level. Task-number: QTIFW-1950 Change-Id: I4bce019a63ba1fbf48e3bb0ca45511e42d4974c9 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Merge remote-tracking branch 'origin/4.0' into masterKatja Marttila2020-11-241-4/+4
|\ | | | | | | Change-Id: If5205ff6ef2c8989520e24d41595c04d5920d207
| * CLI: Tidy up progress message printArttu Tarkiainen2020-11-051-4/+4
| | | | | | | | | | | | | | | | The debug print does not look very nice when the string contains escape characters for quotes or extra spaces. Change-Id: I9428d3aef4e3ebd693f66083447430e4e2600098 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Automatically uninstall unneeded virtual componentsMartin Kampas2020-11-041-2/+4
| | | | | | | | | | | | Change-Id: Ifbbfec4449a9f5b0a79269fc7ddfcc1780e762e5 Task-number: QTBUG-76210 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | CLI: Add possibility to filter installed packages with regexpArttu Tarkiainen2020-11-041-0/+4
|/ | | | | | Task-number: QTIFW-1953 Change-Id: Ie291e8ae96d46082e342e9bcb152258862813afd Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* CLI: Give more meaningfull return value for installsKatja Marttila2020-09-251-32/+80
| | | | | | | | | | | | | | Instead of returning just true or false when running installer or maintenancetool, utilize the PackagemanagerCore status message. Added also a new status enum, EssentialUpdated, which is returned when calling command 'update' and only essential components are updated. Also fixed a bug when components could be installed even when there were an essential update available. Task-number: QTIFW-1969 Change-Id: I43826301656573b34e1338b49566d199bdcd7468 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Obey --no-default-installations when default set from scriptKatja Marttila2020-09-091-0/+11
| | | | | | Task-number: QTIFW-1930 Change-Id: Ie180777a0c5dc7c6a7b4e273169e673cd5c7e918 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* CLI: Allow forced component to be selected for installKatja Marttila2020-08-311-0/+12
| | | | | | Task-number: QTIFW-1929 Change-Id: I4c9cc7449126b6bb8898f5148f2cb612b175f52a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Inform if trying to uninstall virtual componentKatja Marttila2020-05-271-0/+18
| | | | | | Task-number: QTIFW-1811 Change-Id: I333d6d0bd93f8538919f172113b7039b63491492 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* CLI: Add new option --file-query to auto answer QFileDialogKatja Marttila2020-05-261-0/+25
| | | | | | | | | | | | | QFileDialog.getExistingDirectory and QFileDialog.getOpenFileName can be called from scipt. If command line interface is used, user must type the correct directory or file name from command line during install. With --file-query option user can give the values when running the installer or maintenancetool with syntax --file-query filedialogId=C:/temp,filedialogId2=C:/temp/file.txt. Task-number: QTIFW-1631 Change-Id: I5e58be6b509cf00de832646ef31ec4eda90773be Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* UnitTests: Cleanup codeKatja Marttila2020-05-151-91/+76
| | | | | | | Move recurred code to common functions, remove unnecessary includes Change-Id: Idfe3a0c952d1154470ecb229ff3c1e428beaa3ac Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Remove existing installation from command lineArttu Tarkiainen2020-04-071-0/+24
| | | | | | | | | | | Add new "purge" command to command line interface. This removes all components and all program directory contents. Add test function to unit tests. Task-number: QTIFW-1574 Change-Id: Iccd4a052c7e2fc8eec0a6ae2b5a93c0c607604cb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Tests: Remove unused parameterKatja Marttila2020-04-021-7/+7
| | | | | Change-Id: I533a4ab2591e13abceab371a943adf9cf1781d61 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Ignore test executable process when running testsKatja Marttila2020-04-021-0/+4
| | | | | | | | | | Installer checks if running processes are found from install tree and prevents removing/updating. Added test executable to allowed running process list as we are not trying to remove it. Change-Id: I74445f54971942bbe81bab6c49378fe0a345aa3f Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Fix bug in command line option updateKatja Marttila2020-03-311-84/+58
| | | | | | | | | | | | | | Update was working only for latter component if several was given as arguments. Added also unit tests for cli option update Also created common functions which are used by several command line test. Task-number: QTIFW-1695 Change-Id: I472e1c34bcfb1b60cda110353068f2cec64c468f Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Create unit tests for CLI option uninstallPackagesKatja Marttila2020-03-251-0/+147
| | | | | | Task-number: QTIFW-1638 Change-Id: I027ce7d70cb5a49f1c2a2ed39979a0d3c8773282 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Improve unit tests for CLI option installPackagesKatja Marttila2020-03-251-24/+116
| | | | | | | Task-number: QTIFW-1638 Change-Id: Idd22ee15d01efc0f131c57b5da220de2ae9015b8 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* CLI: Add unit tests and more detailed debug info of local installed packagesKatja Marttila2020-03-131-0/+21
| | | | | Change-Id: I37f0950686aeb303328d7e8137fc4c7cfe7e8840 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Add unit tests for CLI option installPackagesKatja Marttila2020-02-201-0/+26
| | | | | | | Also remove extra space and quotation marks from print output Change-Id: I18eb3532ac79f407023e15ef7ebab78ca0a7f59e Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Add unit tests for CLI option listPackagesKatja Marttila2020-02-131-0/+101
Also remove extra space and quotation marks around printed component values. Task-number: QTIFW-1577 Change-Id: If2c81609e32ee40b81a70106b2e9bf8ac536c089 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>