summaryrefslogtreecommitdiffstats
path: root/coin
diff options
context:
space:
mode:
authorDimitrios Apostolou <jimis@qt.io>2022-01-06 11:05:21 +0100
committerDimitrios Apostolou <jimis@qt.io>2022-01-07 19:34:50 +0100
commit98f1034f96edbd7e7e88a513f8549259fd07c35b (patch)
tree3da468ad4a13f2eb4e1f3a6cf444d7d1756a174e /coin
parent60c22f05e9d37744d65dc51a752a1cf2aa0a383b (diff)
Properly wait for the Android emulator to fully boot
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>
Diffstat (limited to 'coin')
-rw-r--r--coin/instructions/coin_module_test_android_start_emulator.yaml4
1 files changed, 2 insertions, 2 deletions
diff --git a/coin/instructions/coin_module_test_android_start_emulator.yaml b/coin/instructions/coin_module_test_android_start_emulator.yaml
index 448a9ca9af..a212f5742e 100644
--- a/coin/instructions/coin_module_test_android_start_emulator.yaml
+++ b/coin/instructions/coin_module_test_android_start_emulator.yaml
@@ -4,9 +4,9 @@ instructions:
instructions:
- type: ExecuteCommand
command: "{{.InstallDir}}/libexec/android_emulator_launcher.sh"
- maxTimeInSeconds: 300
+ maxTimeInSeconds: 600
maxTimeBetweenOutput: 300
- userMessageOnFailure: "Failed to start emulator, check logs."
+ userMessageOnFailure: "Failed to start emulator, check coin log and ~/emulator.log"
enable_if:
condition: property
property: features