summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Remove the deprecated installationLocations configurationHEADdevRobert Griebl16 hours1-8/+3
| | | | | | | | | | The support for multiple installation destinations was removed in 5.14 and the configuration field was deprecated back then (trying to map old configurations to the new single installation dir setup). It's time to remove that workaround now after 5 years. Change-Id: I1913c5bb97abd16a1d514bca871335e4309a06aa Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Refactor the representation of the YAML configurationRobert Griebl16 hours7-357/+407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a bit of a kitchen sink commit for a lot of things touching the YAML parsing code. Splitting it up would have been a nightmare though and touched a lot of code lines multiple times. - Adding a new field to the YAML confguration was quite involved: 1) add it to the parser in loadFromSource() 2) add it to loadFromCache() 3) add it to saveToCache() (same order as in step 2) 4) add it to merge() 5) bump dataStreamVersion() 6) add one or more public getter function(s) to Configuration, depending on the complexity of the data-type. In order to get around this problem, a lot of fields just used an un-typed QVariantMap. This patch eliminates step 3) and 6) loadFromCache() and saveToCache() now use a common serialize() function and some template magic to do both tasks. - The YAML file is now mostly resembled by a publicly accessible nested struct of structs: this makes the code (a) more readable (as the C++ code matches the YAML structure) and (b) does away with the gazillions of getters. - This was also the perfect time to finally use a real data structure for the OpenGL config, replacing the QVariantMap hack. - While at it, the actual field parsing was made a lot more readble: - got rid of the unnecessary YamlParse* lambda arguments - added helper parseFoo() functions to make code more concise - used the same parseFields(<temp list>) syntax everywhere - added specialized parsing for time duration values Change-Id: Ia811056f7220bf7509af146f69f99c6f7e4b09ea Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* bwrap: Fix missing /usr/lib64 preventing start on Debian/aarch64Robert Griebl13 days1-2/+2
| | | | | | Change-Id: I025c9d9c0086aedfaab96ee771eac5f3422201c6 Pick-to: 6.7 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Remove all literal uses of /tmpRobert Griebl2024-05-159-23/+27
| | | | | | | | | | | | | - In am-configs, use QStandardPaths to avoid creating a mess in the filesystem on Windows. - In the C++ code, we really should be using $XDG_RUNTIME_DIR on Linux nowadays. While at it, the /tmp (and /run) subdirectories used by the appman have been harmonized and made less cryptic. Change-Id: Iab71aff81333653fb12bcecd3e94767b64f2c818 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* appman-controller: detect stale lock files and auto remove themRobert Griebl2024-04-291-0/+1
| | | | | | Change-Id: I7828419c6499ae05eaba9608990400d7cbfd7cd2 Pick-to: 6.7 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Replace all signals/slots keywords with Q_SIGNALS/Q_SLOTSRobert Griebl2024-04-2220-22/+22
| | | | | Change-Id: I92238b01155a2e43b8877576faf603957dcb95ba Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Also support CBOR as a wire format for window properties on WaylandRobert Griebl2024-03-1813-0/+383
| | | | | | | | | Our extension now supports both the old style serialization via QDataStream for Qt clients (version 1) and via CBOR for easy use in non-Qt clients (version 2). Change-Id: I757fda61af126fb273264133552b86f3e0127a6a Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* tests: stabilize the timing in the processtitle testRobert Griebl2024-03-051-1/+2
| | | | | | Change-Id: I44abbc1de658a60eab88ee195798f5c24f02b88d Pick-to: 6.7 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* tests: add a test for the new package-server toolRobert Griebl2024-03-053-0/+295
| | | | | | | | Also fixes three bugs found in the server with those tests. Change-Id: Ic2ca10cc2ee66d644c97b4b613e59521dfcec7eb Pick-to: 6.7 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* tests: cleanupRobert Griebl2024-03-056-28/+5
| | | | | | Change-Id: I4b2151d4586c1b2fd0e75b901c4aaeed310abbe9 Pick-to: 6.7 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Replace all #pragma once with old-style #ifdef include guardsRobert Griebl2024-03-052-2/+8
| | | | | | | | Change-Id: I1805fbccf4d9398fddfe8f4ab977236afc49ca45 Fixes: QTBUG-122951 Pick-to: 6.7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* tests: stabilize flaky tests and add context on failuresRobert Griebl2024-02-283-14/+16
| | | | | | Change-Id: I2de8d216e875af83cb8a14b3ddcefdd787615634 Pick-to: 6.7 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix the two weirdly named auto testsRobert Griebl2024-02-2614-7/+7
| | | | | | | | | | | | | | applicationinstaller -> packagemanager The ApplicationInstaller singleton has been long replaced by PackageManager and that test had been adapted back then. qml/simple -> qml/applicationmanager This was always named incorrectly and is always a source of confusion. Change-Id: Iba25cd9b6b77344b2845a5c1c14cbac6ef489410 Pick-to: 6.7 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Cope with macOS decomposed file names in the PackageManager auto testRobert Griebl2024-02-262-0/+7
| | | | | Change-Id: I2da5b63c771e48c7b851a43f4acae7d14109537f Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Coverage: make it possible to use any Qt buildRobert Griebl2024-02-261-2/+5
| | | | | | | | | | | With these changes, a coverage build is possible: - against a Qt from the installer - against a non-prefixed developer build Qt - when using Coin's stand-alone tests setup Change-Id: I1d9958e2a8cfd1f241a5b6bf5d276751df7957b2 Pick-to: 6.7 6.6 6.5 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* auto-tests: fix the check for QT_FEATURE_am_installerRobert Griebl2024-02-262-0/+5
| | | | | | Change-Id: Ibd6b38b0feeb96402254cfaed576231b014db94c Reviewed-by: Dominik Holland <dominik.holland@qt.io> (cherry picked from commit 0ea0aaad73d09c9aa65979f781b8a103a3e1f83b)
* tests: add a test for Architecture detectionRobert Griebl2024-02-2211-46/+133
| | | | | | | | | | | | | | The test binaries are compressed because you cannot make them as small as possible. Especially macOS enforces the minimum size to be the page size (16KB). The README.md has all the details on how to generate and compress test binaries. Change-Id: I8636772f2f94ac35e8d4fa51b6b76b0c84ad3d7b Pick-to: 6.7 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* tests: add a test for ApplicationInterface propertiesRobert Griebl2024-02-213-6/+57
| | | | | | Change-Id: I80a20c62e58dcfabe45054cfc322e1d03dc683ac Pick-to: 6.7 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* auto-tests: Fix controller testRobert Griebl2024-02-181-2/+2
| | | | | | | | | This (a) adapts to the latests instance-suffix changes and (b) tries to run an dev-build controller binary before using the installed one. Change-Id: Ib77708b948184c154519aa7c73df268b17a65c59 Pick-to: 6.7 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Make attached ApplicationManagerWindow availableBernd Weimer2024-01-151-5/+6
| | | | | | | | It doesn't work with foreign types (yet). Change-Id: Ib29fb23d88feabbc38525045bcc498799d227613 Pick-to: 6.7 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Disable the crash test on ASAN buildsRobert Griebl2024-01-121-0/+3
| | | | | | | Change-Id: I201c609153d87ad3bf35ace3a46559aaca0c966a Fixes: QTBUG-120326 Pick-to: 6.7 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Enable keyinput test againBernd Weimer2024-01-091-3/+1
| | | | | | | | Initial focus needed to be forced on Windows and macOS. Change-Id: I7249f45a82e3df2f40ffee6b2c3025c28d5ac4fd Pick-to: 6.7 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Clazy: fix testsRobert Griebl2024-01-0816-68/+64
| | | | | | Change-Id: I86f6883a90fe9fcc816f65fa34bae19656625498 Pick-to: 6.7 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Modernize string literalsRobert Griebl2024-01-0815-527/+556
| | | | | | | | | Replace all our custom qSL/qL1S/qL1C macros with standard C++ and QString unicode string literals. Change-Id: I9e0b69fb46525421f408f260518a69b8f8125d99 Pick-to: 6.7 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Get rid of the UTF-8 locale check for libarchiveRobert Griebl2023-12-153-9/+0
| | | | | | | | | | Modern libarchive 3 versions are able to deal with UTF-8 encodings explicitly, so we don't have to rely on the locale setting of the whole process for libarchive to pick up the right encoding implicitly. Change-Id: I002deb582a9267d11361520b1d514f4b43ee2a5e Pick-to: 6.7 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix auto-test duplicate date row nameRobert Griebl2023-12-122-12/+12
| | | | | | Change-Id: If53f12134f0183acde30701d9a35a2a49cdb8779 Pick-to: 6.7 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* cmake: add AM_SANITIZE to enable ASANRobert Griebl2023-12-121-0/+1
| | | | | | | | | Also added env var forwarding for [ALT]SAN_OPTIONS in NativeRuntime and fixed a few simple memory leaks. Pick-to: 6.7 6.6 6.5 Change-Id: I4039890bb9316d3a48a447f112b129b5272f81c0 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Quicklaunch: improve the runtimesPerContainer settingRobert Griebl2023-12-123-5/+25
| | | | | | | | | Instead of just having a global value for any container/runtime combination, you can now have fine grained control. Change-Id: Ibfa523893bfb30716b9a5a69d116e29709a9c9d8 Pick-to: 6.7 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix the controller test to also work in single-process modeRobert Griebl2023-12-071-1/+4
| | | | | Change-Id: I60bdb3434d496f5841b3bc0b47eb8559dbd4b7f9 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Add a QT_ prefix to all (semi-) public definesRobert Griebl2023-12-065-6/+6
| | | | | Change-Id: I813282d2bab51a81e3efcacfe0fcb5d9c4ac83b3 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Simplify builing a custom appman executableRobert Griebl2023-12-062-8/+0
| | | | | | | | | | | | | | | | - fixed our cmake library dependencies in regards to private/public - the bwrap plugin should not depend on any AppMan module besides the plugin interface one - the special QML modules are now implicit dependencies of main-lib and application-main-lib respectively, which makes it possible to move the ugly AM_QML_REGISTER_TYPES mechanism out of the appman and launcher executables and into those libraries. - also fixed the iOS build, where we cannot use Security-Framework due to missing functionality, but the fallback to (a non existing) openssl doesn't make sense either. Change-Id: Iced023be98eed3416654a0645f0aa4ed58d10e48 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Align closing ApplicationManagerWindowsBernd Weimer2023-11-281-12/+51
| | | | | | | | | | In-process sub-windows would not be closed if a parent was closed. Out-of-process ApplicationManagerWindows with an Item parent would end up parentless - for windows only the window hierarchy matters, items can be neglected. Change-Id: Ib771eb4661f2fc2828b79efb644988d08e24e5c0 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Skip test package creation, if the installer component is disabledRobert Griebl2023-11-271-0/+5
| | | | | | | Change-Id: I9c86c506df8fc8907537599f91c38d46c46efc66 Task-number: QTBUG-119476 Pick-to: 6.6 6.5 6.2 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Cope with implicitly disabled installer componentRobert Griebl2023-11-271-0/+5
| | | | | | | | | | This can happen, if the Qt we are building against has no support for SSL. Change-Id: I3368d30032989cc724ddf0cbbcb5015fb43c7522 Pick-to: 6.6 6.5 6.2 Fixes: QTBUG-119476 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix all outstanding namespace issuesRobert Griebl2023-11-201-7/+1
| | | | | | | | | | Also replaced the old QT_PREPEND_NAMESPACE_AM macro with the real namespace (QtAM::), as this makes the code easier to read for humans and also for tools like qdbuscpp2xml. The macro is still available, to support old custom appman code. Change-Id: Ifb379f03c1aacbd12ef799beb43013bba029e514 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Make it easier to run unit tests against older, buggy Qt versionsRobert Griebl2023-11-201-0/+5
| | | | | Change-Id: Id0803f115649059e30e44cc2076e162124381ba2 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Use the same exit-codes for single process apps on all platformsRobert Griebl2023-11-201-4/+2
| | | | | | | | Special-casing Windows here doesn't make sense and only complicates unit testing. Change-Id: Ia1280f9762394caf69d67a30f0e803fe545e94df Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Switch to declarative registrationRobert Griebl2023-11-0820-0/+23
| | | | | | | | | | | | | | | | | | | | | | After reworking all the sys-ui/app shared classes, we can now finally switch to declarative registration. As each QML namespace can only have one qt_internal_add_qml_module assigned, we need a dedicated lib/module for each of our namespaces. Due to this problem and in order to keep the code clean, all declarative registrations are kept out of the actual classes (as these are spread over multiple static libs). Instead they are all done in one place (src/qml/../) using the "foreign" syntax. The internal AmTest class (only used for the QML auto tests) had to be moved to a new QtApplicationManager.Test namespace, because adding an imperative registration to a declaratively registered namespace hides all the existing classes. Change-Id: I2e5b782da33a470a6d267cf45b42866fe6a9c14e Task-number: QTBUG-103266 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Add an auto-test for window focus/activation handlingRobert Griebl2023-11-088-0/+330
| | | | | | | | | | Also added a getter for the actual "adapter" Quick item on the sys-ui side (backingItem), as it is needed for this test. It might come in handy for user projects as well, especially to get direct access to the QWaylandQuickItem. Change-Id: I9665ca31566e98bae086b8cdc1aa2df5cab4023e Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Extend timeout on bubblewrap test for CoinRobert Griebl2023-11-061-1/+1
| | | | | Change-Id: Ib97f4755f075458c4ee705fc67629e1b7d5ec9a0 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* bwrap: Improve kernel namespace (un)sharingRobert Griebl2023-10-301-1/+2
| | | | | | | | | | Instead of just making the network namespace unshared via the "unshareNetwork" option, we have full control over all namespaces via the new config option "sharedNamespaces". Change-Id: I986fbf7f2e99289ee874f7ac83ba43964f2253a7 Fixes: QTBUG-118524 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Adapt to behavior change in QTemporaryFileRobert Griebl2023-10-301-1/+2
| | | | | | | | | | 935562a77ba5f4dc90960ae5685c461efc83c0ee in qtbase changed how QTemporaryFile::fileName works. Since we rely on the exact path for the test, we have to adapt. Change-Id: Ibc5c53de78ff94c576f022c2260313ae4c32d76a Fixes: QTBUG-118603 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Fix window mapping test by removing peculiar child window test caseZoltan Gera2023-10-191-8/+1
| | | | | | | | | | | | Hiding a child window which parent was made invisible before was not possible in the multi-process scenario. This behavior was fixed in qtdeclarative 16023fc77c423a267fcc48894ff942e94cf35b86, so the special test case for this can be dropped. From now on, the behaviors between single- and multi-process scenarios are the same and the tests also reflect that. Change-Id: Icd17e099d21750ab8971ab54dd6efd9ca7894891 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix adding wayland extensionsBernd Weimer2023-10-091-0/+1
| | | | | | | | | | Wayland extension objects should be created within their component context to allow "ComponentBehavior: Bound", which will be the default in the future. Change-Id: Ib229c9a9c0fd006c88d939140ad364bd902f1978 Pick-to: 6.6 6.5 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* DBus cleanup, part 2 and shared QML APIRobert Griebl2023-09-264-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrote the NativeRuntime <-> Launcher communication using auto- generated interfaces and adaptors. Also made the shared QML classes (Notification and ApplicationInterface) simple QObjects, so the QMetaObject is always the same: both on the AM and the launcher side. This is necessary for qmlsc, as the compiler doesn't know how to deal with different MOC data for the same class name in different processes. Along the same lines, ApplicationManagerWindow is now a QObject, both for in-process (this was already the case) and out-of process use. The out-of-process/Wayland implementation will now implicitly allocate a QQuickWindow and re-parent it accordingly to have the same visibility behavior as if you would be using normal Windows. Also FrameTimer got an Impl backend, although in this case a special implementation is only needed for the System-UI. And additional unrelated change was rolled into this: launcher-lib was renamed to application-main-lib and the class LauncherMain to ApplicationMain to better reflect their purpose (the lib started as the basis for launcher-qml, but evolved into a generic app/launcher helper) The reason for including these changes here is that we are touching all the files in there anyway and having a rename after these big changes would make git blame far less useful. Change-Id: Iff915c1b2209f8104051dc131b9add5498df277c Task-number: QTBUG-103266 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* QML can now deal with QList<object derived type *> propertiesRobert Griebl2023-09-261-0/+8
| | | | | | | | | | This means we can finally make our QML API look nicer. Also extended the simple QML auto-test to make sure the changed API gets tested. Change-Id: I4ce3d7d49b2cf93ed1959bd2c1c835bd3e4ce0dc Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix iOS build and re-enable macOS/arm64Robert Griebl2023-09-051-1/+3
| | | | | | | Change-Id: I9ec982019d91151552707bcb27007b57d6f76457 Pick-to: 6.6 Reviewed-by: Dominik Holland <dominik.holland@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* cmake: allow compilation of appman-packager when cross-compilingRobert Griebl2023-09-011-6/+2
| | | | | | | | | | | | | cmake will not compile tools when cross-compiling anyway, but due to our custom check, you couldn't even force the build with -DQT_FORCE_BUILD_TOOLS=ON if you needed to. In addition, the documentation for the "tools-only" configure option was very outdated. Change-Id: Ib5e6a72414ba5bbe0c5dc98d8ec5d5e66790216e Pick-to: 6.5 6.6 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* bubblewrap: Fix certificate location in example and test configDominik Holland2023-08-311-3/+3
| | | | | | | Fixes: QTBUG-116627 Pick-to: 6.6 Change-Id: I65c160dbeefaf49f6e58535c7b89444405a5e5fa Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Remove the last foreach in the testsRobert Griebl2023-08-221-3/+6
| | | | | | | | Nowadays, even tests are compiled with QT_NO_FOREACH Change-Id: Ife9accc496d39d8d622c011a0ba5312331054733 Pick-to: 6.6 Reviewed-by: Dominik Holland <dominik.holland@qt.io>