From patchwork Thu Dec 13 22:22:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Doan X-Patchwork-Id: 13556 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3AF7623FCD for ; Thu, 13 Dec 2012 22:22:20 +0000 (UTC) Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com [209.85.223.176]) by fiordland.canonical.com (Postfix) with ESMTP id C6C69A1836F for ; Thu, 13 Dec 2012 22:22:19 +0000 (UTC) Received: by mail-ie0-f176.google.com with SMTP id 13so4814364iea.21 for ; Thu, 13 Dec 2012 14:22:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :content-type:mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state; bh=vwC8+BvNaBuE4fdBwFPKV0u6XsRO5xvybBS/bUjgwW8=; b=PGW08uyqD29cCKvp7stwmfACaKuFqzNEc3En5OVsJ3hX8KUf77DE9KjyF/odWBk2cR moIKi22bwvS1BXvZOo7dERaKl85K+6La322qYXwLd80WdTqKh36xDtUtjhMT4aj3EyG1 sEOWEajBkOJKnRw9wIDzjRLbHdOaIkIDGi3RQivDN9n2CfV7Y6Izoij+s9MaCOpWm5sZ SEqKM+YdgBtxsShi/KlR3ID+bIu0SY/NZpd8jiun2sKg5AAlgjDn6sKCWG8LCEnZLtCy 5eZtEvHm8urikQZL0/VLLz1NDh2ZzLiaIfK2JWigwEA9Ur11L2PN9y0qz22u6shu8r5b AUQQ== Received: by 10.50.161.169 with SMTP id xt9mr18254104igb.62.1355437339233; Thu, 13 Dec 2012 14:22:19 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp38992igt; Thu, 13 Dec 2012 14:22:18 -0800 (PST) Received: by 10.180.104.136 with SMTP id ge8mr5877349wib.2.1355437336557; Thu, 13 Dec 2012 14:22:16 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id u9si605446wjq.59.2012.12.13.14.22.15 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 13 Dec 2012 14:22:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1TjHAV-0000J5-9d for ; Thu, 13 Dec 2012 22:22:15 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 41536E014E for ; Thu, 13 Dec 2012 22:22:15 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dispatcher X-Launchpad-Branch: ~linaro-validation/lava-dispatcher/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 495 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 495: improve some android boot logic and options Message-Id: <20121213222215.8186.13733.launchpad@ackee.canonical.com> Date: Thu, 13 Dec 2012 22:22:15 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="16369"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 1b6133268ad0a7d264f66b8e16d9fb590f2d0f4c X-Gm-Message-State: ALoCoQlBC6QDYeYNlw7EW8XKaQv1Uq1Vd6AxcxY3BKbGBLwlOoBQNTuwgBExbGO0P4zyimEFI5t3 ------------------------------------------------------------ revno: 495 committer: Andy Doan branch nick: android-fixes timestamp: Thu 2012-12-13 14:02:55 -0600 message: improve some android boot logic and options not all android devices want the coming up of the home screen to be counted as a good boot. So this adds a config option to make waiting for the home screen optional. Additionally, I noticed we wait for the homescreen when establishing a tester session which makes no sense since you've already done that waiting. Lastly, I made the number of loops to wait for home screen configurable in case someone gets the urge to increase/decrease for their device 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 === modified file 'lava_dispatcher/client/base.py' --- lava_dispatcher/client/base.py 2012-12-05 14:47:46 +0000 +++ lava_dispatcher/client/base.py 2012-12-13 20:02:55 +0000 @@ -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' --- lava_dispatcher/config.py 2012-12-05 14:47:46 +0000 +++ lava_dispatcher/config.py 2012-12-13 20:02:55 +0000 @@ -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):