aboutsummaryrefslogtreecommitdiff
path: root/automated/lib
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2017-09-27 18:05:10 +0800
committerChase Qi <chase.qi@linaro.org>2017-09-28 19:42:20 +0800
commit595f5090ca2a1397955deee3ef8f5480bdb0ef01 (patch)
tree37416ddef90c8765e61bc41a74b816ea9aa173fe /automated/lib
parent5f374f6b67e08cb349891e86d5a8188b5633e79b (diff)
andorid automated boottime: some improvements
1. print more message for debug help to investigate why the analyse part is failed. some times the files collected lost when try to analyze like here: https://staging.validation.linaro.org/scheduler/job/191519#L13962 seems some problem there with the logcat_all_1.log file 2. add _avg suffix for the statistic result which we are interested in 3. ignore the case when grep keyword from logcat or dmesg 4. call disablesuspend.sh on device side to wait the launcher display log printed in logcat message Change-Id: I8006995397d407d7188a2137e8f4190bea86b4e0 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Diffstat (limited to 'automated/lib')
-rwxr-xr-xautomated/lib/android-test-lib14
1 files changed, 13 insertions, 1 deletions
diff --git a/automated/lib/android-test-lib b/automated/lib/android-test-lib
index 16db841..3c5e829 100755
--- a/automated/lib/android-test-lib
+++ b/automated/lib/android-test-lib
@@ -93,9 +93,21 @@ wait_boot_completed() {
wait_homescreen() {
[ "$#" -ne 1 ] && error_msg "Usage: wait_homescreen timeout_in_seconds"
+
+ # call disablesuspend.sh if it exists
+ # on some builds, the launcher package might not be com.android.launcher,
+ # in this case we expect the build to have this disablesuspend.sh script
+ # which is used to check the display of homescreen.
+ # if there is not such disablesuspend.sh script, then use the default check
+ if adb_shell_which disablesuspend.sh; then
+ if adb shell /system/bin/disablesuspend.sh; then
+ info_msg "Target booted to homescreen successfully."
+ return
+ fi
+ fi
+
timeout="$1"
end=$(( $(date +%s) + timeout ))
-
homescreen_displayed=false
while [ "$(date +%s)" -lt "$end" ]; do
if adb logcat -sd ActivityManager:I | grep "Displayed com.android.launcher"; then