=== modified file 'lava_dispatcher/client/base.py'
@@ -253,8 +253,9 @@
def wait_home_screen(self):
cmd = 'getprop init.svc.bootanim'
- for count in range(100):
- logging.debug("Waiting for home screen (%d/100)" % count)
+ tries = self._client.config.android_home_screen_tries
+ for count in range(tries):
+ logging.debug("Waiting for home screen (%d/%d)", count, tries)
try:
self.run(cmd, response=['stopped'], timeout=5)
if self.match_id == 0:
@@ -339,14 +340,7 @@
pass
session.android_adb_connect(dev_ip)
session.wait_until_attached()
- try:
- session.wait_home_screen()
- except:
- # ignore home screen exception if it is a health check job.
- if not (self.context.job_data.has_key("health_check") and self.context.job_data["health_check"] == True):
- raise
- else:
- logging.info("Skip raising exception on the home screen has not displayed for health check jobs")
+
try:
yield session
finally:
@@ -446,7 +440,8 @@
this needs wait unitl the home screen displayed"""
session = AndroidTesterCommandRunner(self)
try:
- session.wait_home_screen()
+ if self.config.android_wait_for_home_screen:
+ session.wait_home_screen()
except:
# ignore home screen exception if it is a health check job.
if not (self.context.job_data.has_key("health_check") and self.context.job_data["health_check"] == True):
=== modified file 'lava_dispatcher/config.py'
@@ -74,9 +74,11 @@
simulator_command = schema.StringOption()
simulator_axf_files = schema.ListOption()
- android_disable_suspend = schema.BoolOption(default = True)
- android_adb_over_usb = schema.BoolOption(default = False)
- android_adb_over_tcp = schema.BoolOption(default = True)
+ android_disable_suspend = schema.BoolOption(default=True)
+ android_adb_over_usb = schema.BoolOption(default=False)
+ android_adb_over_tcp = schema.BoolOption(default=True)
+ android_wait_for_home_screen = schema.BoolOption(default=True)
+ android_home_screen_tries = schema.IntOption(default=100)
class OptionDescriptor(object):