summaryrefslogtreecommitdiffstats
path: root/util/android
Commit message (Collapse)AuthorAgeFilesLines
* Android: fix default name of the CI emulatorAssam Boudjelthia2022-05-191-1/+1
| | | | | | | | | | This name was changed in qt5/coin but wasn't reflected here. Currently, things works correctly because the test target provide the correct name as an env var. Pick-to: 6.2 6.3 Change-Id: I8968285de2c7759d16f303c48d6295295dffbef6 Reviewed-by: Simo Fält <simo.falt@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-27/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Properly wait for the Android emulator to fully bootDimitrios Apostolou2022-01-071-34/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It had been noticed that sometimes the Android emulator in our CI took several minutes to fully boot. It turns out that this behavior can be reproduced locally by removing the image files under $HOME/.android especially the "userdata-qemu.img.qcow2" file. Then the emulator goes through several reboots until fully booted with a full set of packages installed. We discovered that the property that signifies it is finished is dev.bootcomplete=1. So we now check for this flag and remove the other heuristics we had. We also disable the debug output to avoid hundreds lines of logs. Instead we selectively print the values that the emulator returns, every second until full boot is detected. We increase the Coin timeout for the shell script, from 5min to 10min, since it has been measured that it takes about 2.5min on a good day, and the script itself retries several times to restart the emulator in case of failure. Finally we adjust the coding style a bit to be more consistent. Pick-to: 6.3 6.2 Fixes: QTQAINFRA-4681 Change-Id: I77062dceb91477e957696c89bfacb4ebabc34c1f Reviewed-by: Toni Saario <toni.saario@qt.io> Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Wait for boot to be fully complete with all packages installedDimitrios Apostolou2022-01-061-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | It happens that the android emulator supposedly "finishes" booting and getprop shows bootanim=stopped and boot_completed=1. But sometimes not all packages have been installed (`pm list packages` shows only 16 packages installed). After around half a minute the boot animation starts spinning (bootanim=running) again despite boot_completed=1 all the time. After some minutes the boot animation stops again and the list of packages contains 80 packages, among which is also the "development" package. Only then is the device ready for `adb install` of custom packages. This should be the last time we see the message: Error: Could not access the Package Manager. Is the system running? Just for completeness, we also properly disown the emulator process and its file descriptors, since the parent shell dies but the process stays. Pick-to: 6.3 6.2 Fixes: QTQAINFRA-4681 Change-Id: I2b9d4bdc3dac0f10d09d4f09c83b4028ebc31f48 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Do not hide android emulator outputDimitrios Apostolou2022-01-061-1/+4
| | | | | | | | | | | | | It might print useful messages, even though they might come mixed with other test messages. However we can't leave stdout/stderr as is, because Coin agent hangs at the end of the shell script, waiting for them to close. So we just redirect them to a file. Pick-to: 6.3 6.2 Change-Id: I797af78786b7df31131b3c3261e1c1fc00e5d460 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Wait for android emulator to be up and running properlyDimitrios Apostolou2022-01-061-11/+41
| | | | | | | Pick-to: 6.3 6.2 Fixes: QTQAINFRA-4681 Change-Id: Icfa75b6982964970172726379e5a2a2bb640f8bf Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Rename deprecated ANDROID_SDK_HOME to ANDROID_SDK_ROOTAssam Boudjelthia2021-10-221-2/+2
| | | | | | | Pick-to: 6.2 Task-number: QTBUG-97002 Change-Id: I777491f542e5388e04ed4c1b7ff5d9db75f9e778 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* Change Android emulator command pathHeikki Halmet2021-06-141-1/+1
| | | | | | | Pick-to: 6.2 Pick-to: 6.1 Change-Id: I6e7df6cdf7f0a0a7efea8fb7672be0b3df096d12 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Add option to use different ANDROID_EMULATORHeikki Halmet2021-06-021-2/+6
| | | | | | | | | This change add option to determine used Android emulator version using environment variable. If variable is not set @x86emulator will be used as default value. Change-Id: Ifc52d07d058bf078bf915ca78683822a966b58fb Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* CI: explicitly use -gpu swiftshader_indirect with Android emulatorAssam Boudjelthia2021-05-311-1/+1
| | | | | | | Force the emulator to use software acceleration to avoid a crash. Change-Id: I1e73b8bc6485b0854cf83f5d9faa5d5f872a90df Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Coin: fix android emulator script to use bash instead of shAssam Boudjelthia2021-02-191-1/+1
| | | | | | | Task-number: QTBUG-91180 Pick-to: 6.0 6.1 Change-Id: I410c6769aac3b3b760ff35aa71d52c8a5d6c1143 Reviewed-by: Toni Saario <toni.saario@qt.io>
* Coin: remove workarounds to allow running Android testsAssam Boudjelthia2021-02-181-36/+0
| | | | | | | | | | | | | We had two workarounds: * script that adds Gui to tests * create a symbolic link for the qt install dir to fake_prefix which androiddelployqt was expecting them to be under Both issues are fixed, thus removing the workarounds. Pick-to: 6.1 6.0 Change-Id: Ic022bece15afe92c693d573893d260b13b4227ed Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* Android: restart emulator if it gets stuck during testingAssam Boudjelthia2020-12-111-0/+70
| | | | | | | Task-number: QTQAINFRA-4052 Pick-to: 6.0 Change-Id: Ie1a0d1c6b6c5cd0425b7ccf195ac57408142f3c3 Reviewed-by: Simo Fält <simo.falt@qt.io>
* Add coin instructions to run Android test in emulatorSimo Fält2020-11-201-0/+36
Task-number: QTQAINFRA-3867 Pick-to: 6.0 Change-Id: Ie6dd9c2dfeeccd526c2133d7ac03efce5b7ed091 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>