Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: build/android/device_status_check.py

Issue 16280004: Use full path to apk install script and CheckInstall apk. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Do not send alert on slow install and fail on low battery. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/device_status_check.py
diff --git a/build/android/device_status_check.py b/build/android/device_status_check.py
index 47a63a0969a757bd75a25f25de5ba45c563c0470..bafdf7da2ca3785e0be5de2c886c11b04a215d19 100755
--- a/build/android/device_status_check.py
+++ b/build/android/device_status_check.py
@@ -12,8 +12,9 @@ import smtplib
import sys
import re
-from pylib import buildbot_report
from pylib import android_commands
+from pylib import buildbot_report
+from pylib import constants
from pylib.cmd_helper import GetCmdOutput
@@ -39,8 +40,9 @@ def DeviceInfo(serial):
setup_wizard_disabled = AdbShellCmd(
'getprop ro.setupwizard.mode') == 'DISABLED'
battery = AdbShellCmd('dumpsys battery')
- install_output = GetCmdOutput(['build/android/adb_install_apk.py', '--apk',
- 'build/android/CheckInstallApk-debug.apk'])
+ install_output = GetCmdOutput(
+ ['%s/build/android/adb_install_apk.py' % constants.CHROME_DIR, '--apk',
+ '%s/build/android/CheckInstallApk-debug.apk' % constants.CHROME_DIR])
install_speed_found = re.findall('(\d+) KB/s', install_output)
if install_speed_found:
install_speed = int(install_speed_found[0])
@@ -67,21 +69,23 @@ def DeviceInfo(serial):
'']
errors = []
- if battery_level < 5:
+ if battery_level < 15:
errors += ['Device critically low in battery. Do not use for testing.']
if not setup_wizard_disabled:
errors += ['Setup wizard not disabled. Was it provisioned correctly?']
if device_product_name == 'mantaray' and ac_power != 'true':
errors += ['Mantaray device not connected to AC power.']
- if install_speed < 800:
- errors += ['Device install speed too low. Do not use for testing.']
+ # TODO(navabi): Insert warning once we have a better handle of what install
+ # speeds to expect. The following lines were causing too many alerts.
+ # if install_speed < 500:
+ # errors += ['Device install speed too low. Do not use for testing.']
# TODO(navabi): Determine if device status check step should fail on slow
# install speed. The original CL caused the step to fail but was reverted
# because it caused too many early failures. Determine if it was just flake.
# Also, do not fail on 'Unknown' caused by offline device, because other
# devices can still be used for tests.
- fail_step = (battery_level == 'Unknown' or battery_level >= 5)
+ fail_step = (battery_level == 'Unknown' or battery_level >= 15)
return device_type, device_build, '\n'.join(report), errors, fail_step
@@ -183,6 +187,7 @@ def main():
parser.error('Unknown options %s' % args)
devices = android_commands.GetAttachedDevices()
types, builds, reports, errors = [], [], [], []
+ fail_step_lst = []
if devices:
types, builds, reports, errors, fail_step_lst = zip(*[DeviceInfo(dev)
for dev in devices])
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698