From patchwork Wed May 23 21:52:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Le Chi Thu X-Patchwork-Id: 8934 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 32ECA23E01 for ; Wed, 23 May 2012 21:52:16 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id E0958A18082 for ; Wed, 23 May 2012 21:52:15 +0000 (UTC) Received: by ggnf1 with SMTP id f1so8694569ggn.11 for ; Wed, 23 May 2012 14:52:15 -0700 (PDT) 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=x4Nab2Y91ydPs/N4jlepAlg/HjN5vcaWn+RPyJx5T8M=; b=IFSGhjAY7jexZLyMjsEqZNcn98jqlh2pA0jEIUZy7h7KgZ1hXcdo4q8/dxKc4rPJW0 mL1Zfr1GidRZhmm5blvjLdOWV6aDNcE4wfHFZ7rPw+VNnJr93B2K9lJI/WgotL9HIBEI i+62U0OYg91yvLDvFuKX2owL3bUnUPJ32XXiQ+BEzeY4UW+3cL/W1REHXYcZWYlvUFVe W7Des85x6SH1b96CoHnDFSax7BEk54d6Aks1j+uvNyBxlQKYWUXG1Rj4+AD4Ut5K4Ul3 uZvVOyw5jJsA/7KZdctXh+k4Nqgb5UfQoLR0EmDmejeiFbUSvcJZIg/RKI3hX06lpn92 v1iw== Received: by 10.50.203.39 with SMTP id kn7mr14614330igc.53.1337809935290; Wed, 23 May 2012 14:52:15 -0700 (PDT) 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.231.35.72 with SMTP id o8csp480449ibd; Wed, 23 May 2012 14:52:14 -0700 (PDT) Received: by 10.216.134.24 with SMTP id r24mr15201441wei.84.1337809933643; Wed, 23 May 2012 14:52:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id l8si301332wiw.14.2012.05.23.14.52.13 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 May 2012 14:52:13 -0700 (PDT) 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 1SXJTY-0000Kf-V1 for ; Wed, 23 May 2012 21:52:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id E2BDAE160D for ; Wed, 23 May 2012 21:52:12 +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: 298 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 298: skip raising exception when home screen if it is health check jobs Message-Id: <20120523215212.5062.64719.launchpad@ackee.canonical.com> Date: Wed, 23 May 2012 21:52:12 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="15282"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 8b9921ac57bb0aba0faf329f0c96acbb203fda39 X-Gm-Message-State: ALoCoQnHD1pT5a+uKnWVtSTgUnzrCC1clnqYokhkTnvl58wxTwYBPNFy92B8EMBN/prgKLzC29pV Merge authors: Le Chi Thu le.chi.thu@linaro.org Related merge proposals: https://code.launchpad.net/~le-chi-thu/lava-dispatcher/skip-home-screen-hcj/+merge/106821 proposed by: Le Chi Thu (le-chi-thu) review: Approve - Zygmunt Krynicki (zkrynicki) ------------------------------------------------------------ revno: 298 [merge] committer: Le Chi Thu le.chi.thu@linaro.org branch nick: trunk timestamp: Wed 2012-05-23 23:49:59 +0200 message: skip raising exception when home screen if it is health check jobs modified: doc/changes.rst lava_dispatcher/client/base.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 'doc/changes.rst' --- doc/changes.rst 2012-05-22 13:12:56 +0000 +++ doc/changes.rst 2012-05-23 21:49:59 +0000 @@ -2,6 +2,7 @@ *************** * Fixed reboot issues +* Skip raising exception on the home screen has not displayed for health check jobs .. _version_0_7_1: === modified file 'lava_dispatcher/client/base.py' --- lava_dispatcher/client/base.py 2012-05-22 13:03:31 +0000 +++ lava_dispatcher/client/base.py 2012-05-23 21:49:59 +0000 @@ -350,7 +350,14 @@ pass session.android_adb_connect(dev_ip) session.wait_until_attached() - session.wait_home_screen() + 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: @@ -443,7 +450,15 @@ """ disable the suspend of images. this needs wait unitl the home screen displayed""" session = AndroidTesterCommandRunner(self) - session.wait_home_screen() + 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") + stay_awake = "delete from system where name='stay_on_while_plugged_in'; insert into system (name, value) values ('stay_on_while_plugged_in','3');" screen_sleep = "delete from system where name='screen_off_timeout'; insert into system (name, value) values ('screen_off_timeout','-1');" lockscreen = "delete from secure where name='lockscreen.disabled'; insert into secure (name, value) values ('lockscreen.disabled','1');"