From patchwork Wed Dec 5 14:50:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Terceiro X-Patchwork-Id: 13378 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 0BF7623E51 for ; Wed, 5 Dec 2012 14:50:20 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 95630A18A23 for ; Wed, 5 Dec 2012 14:50:19 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id t4so3833960iag.11 for ; Wed, 05 Dec 2012 06:50: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=A5skPp8Hs/eWtsjWdG/tc+8UlNV0wC/SVQjQF7Jl9Jk=; b=PQpqbr2ClwAAGfOIqAdeGPVuCg+KPoRtzR5c/iGw1fbBbkY3C2yANr7zC2TlqPtxIz RVK6QmQpJ5shCnGKhZzkbYsjfqTb1EkyOJ0G/uo2Til7MDzKHjbBOmtXRvjj4qB59RM2 wknn+rWF0iD+geURGygBHlFOmk6C+HP8mvhELE2jn06deT8tKHqILcDLdGqavciQU7tg 9LYWjuF0zf/efCE2SVfwJVGieMH7tHAG51x33LrUR59oiU0vUn49lUYGrUpdZHYyRgXC lAj3UhtokXOhnCmK1PSLeXkMCYGiQTLI7UhaX/P15eNkgPPrp7elC3+M8EGmTQ2O9doi It/A== Received: by 10.50.187.197 with SMTP id fu5mr2076350igc.70.1354719018897; Wed, 05 Dec 2012 06:50:18 -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 n20csp344821igt; Wed, 5 Dec 2012 06:50:18 -0800 (PST) Received: by 10.180.106.34 with SMTP id gr2mr3632150wib.18.1354719017158; Wed, 05 Dec 2012 06:50:17 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id p6si5601268wiw.0.2012.12.05.06.50.16 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Dec 2012 06:50:17 -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 1TgGIh-0000co-Vk for ; Wed, 05 Dec 2012 14:50:16 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id DF321E0151 for ; Wed, 5 Dec 2012 14:50: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: 487 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 487: small refactoring on Android handling code Message-Id: <20121205145015.32515.67580.launchpad@ackee.canonical.com> Date: Wed, 05 Dec 2012 14:50: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="16335"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: e930040c5f278a031e18933a2eef0b7c774d0a37 X-Gm-Message-State: ALoCoQnC0o7qbM1mmJtv6nQC3pGsetGT2x/LRk0kJPgI4zrZDmoauFLIPRQR7dibvM+5oygqXlHN ------------------------------------------------------------ revno: 487 committer: Antonio Terceiro branch nick: trunk timestamp: Wed 2012-12-05 11:47:46 -0300 message: small refactoring on Android handling code cherry-picked from lp:~terceiro/lava-dispatcher/nexus 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-11-29 08:54:47 +0000 +++ lava_dispatcher/client/base.py 2012-12-05 14:47:46 +0000 @@ -254,6 +254,7 @@ def wait_home_screen(self): cmd = 'getprop init.svc.bootanim' for count in range(100): + logging.debug("Waiting for home screen (%d/100)" % count) try: self.run(cmd, response=['stopped'], timeout=5) if self.match_id == 0: @@ -272,9 +273,6 @@ return True return False - def retrieve_results(self, result_disk): - raise NotImplementedError(self.retrieve_results) - class LavaClient(object): """ @@ -411,6 +409,9 @@ '''returns attachments to go in the "lava_results" test run''' return [ create_attachment('serial.log', self.sio.getvalue()) ] + def retrieve_results(self, result_disk): + raise NotImplementedError(self.retrieve_results) + # Android stuff def get_android_adb_interface(self): @@ -426,15 +427,18 @@ raise OperationFailed("booting into android test image failed") #TODO: set up proxy - # we are tcp'ish adb fans here... - self._disable_adb_over_usb() - - self._disable_suspend() + if not self.config.android_adb_over_usb: + self._disable_adb_over_usb() + + if self.config.android_disable_suspend: + self._disable_suspend() + if self.config.enable_network_after_boot_android: time.sleep(1) self._enable_network() - self._restart_adb_after_netup() + if self.config.android_adb_over_tcp: + self._enable_adb_over_tcp() def _disable_suspend(self): @@ -462,8 +466,8 @@ session.run("ifconfig " + self.config.default_network_interface, timeout=20) - def _restart_adb_after_netup(self): - logging.info("Restart adb after netup") + def _enable_adb_over_tcp(self): + logging.info("Enabling ADB over TCP") session = AndroidTesterCommandRunner(self) session.run('setprop service.adb.tcp.port 5555') session.run('stop adbd') === modified file 'lava_dispatcher/config.py' --- lava_dispatcher/config.py 2012-12-02 17:40:55 +0000 +++ lava_dispatcher/config.py 2012-12-05 14:47:46 +0000 @@ -74,6 +74,10 @@ 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) + class OptionDescriptor(object): def __init__(self, name):