diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 563: Allow user to define the activity to wait for on boot.

Message ID 20130219062812.32460.44439.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Tyler Baker Feb. 19, 2013, 6:28 a.m. UTC
Merge authors:
  Tyler Baker (tyler-baker)
Related merge proposals:
  https://code.launchpad.net/~tyler-baker/lava-dispatcher/android-wait-for-homescreen-extension/+merge/148986
  proposed by: Tyler Baker (tyler-baker)
  review: Approve - Michael Hudson-Doyle (mwhudson)
------------------------------------------------------------
revno: 563 [merge]
committer: Tyler Baker <tyler.baker@linaro.org>
branch nick: trunk
timestamp: Mon 2013-02-18 22:26:39 -0800
message:
  Allow user to define the activity to wait for on boot.
modified:
  lava_dispatcher/client/base.py
  lava_dispatcher/config.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_dispatcher/client/base.py'
--- lava_dispatcher/client/base.py	2013-01-23 17:52:50 +0000
+++ lava_dispatcher/client/base.py	2013-02-18 06:00:28 +0000
@@ -294,12 +294,11 @@ 
 
     def wait_home_screen(self):
         timeout = self._client.config.android_home_screen_timeout
-        launcher_pat = ('Displayed com.android.launcher/'
-                        'com.android.launcher2.Launcher:')
+        activity_pat = self._client.config.android_wait_for_home_screen_activity
         #waiting for the home screen displayed
         try:
             self.run('logcat -s ActivityManager:I',
-                     response=[launcher_pat],
+                     response=[activity_pat],
                      timeout=timeout, wait_prompt=False)
         except pexpect.TIMEOUT:
             raise GeneralError('The home screen has not displayed')

=== modified file 'lava_dispatcher/config.py'
--- lava_dispatcher/config.py	2013-01-21 13:11:47 +0000
+++ lava_dispatcher/config.py	2013-02-18 06:00:28 +0000
@@ -83,6 +83,7 @@ 
     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_wait_for_home_screen_activity = schema.StringOption(default="Displayed com.android.launcher/com.android.launcher2.Launcher:")
     android_home_screen_timeout = schema.IntOption(default=1800)
     android_boot_prompt_timeout = schema.IntOption(default=1200)
     android_orig_block_device = schema.StringOption(default="mmcblk0")