From patchwork Wed Aug 15 14:38:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Doan X-Patchwork-Id: 10758 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 8274223E56 for ; Wed, 15 Aug 2012 14:38:14 +0000 (UTC) Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by fiordland.canonical.com (Postfix) with ESMTP id 75661A184AB for ; Wed, 15 Aug 2012 14:38:14 +0000 (UTC) Received: by wibhn17 with SMTP id hn17so4762896wib.17 for ; Wed, 15 Aug 2012 07:38:14 -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=dykM/VOlhv+IRL3MLGaF3NWtzXLI99u/1GubHOeEm/s=; b=ozYXPH08XUD3Mz74ZYM8E+9l7b+L2u7SKB1+6P1OD35CCaW6rafmx5Ta73loovemuX KmuPyn3icdOK9bgdLaliKok1BMQTd93LsaK5nOQEzNEjAr1MjLCSwCXCebh6cgWj/gM3 hjQkV92aafTaRxbKE6rJhHm0/5avb2+9iXQjCdwkytywPUMSz1qg7fbyH3gzZxMLg6Gp LB+TlVXfAdIP9voRVdBEbDHUp2jOgoDv6NtlYqdfb+Csvep46tBEertGV0l7aLIYwj76 yxOVoBW+tTvIjpvUqgY+3AtWfn0vmy3AwyucDNSqV0UBzYIQaFGcgZEQRhyoqXNtKy+J 3XyA== Received: by 10.50.95.230 with SMTP id dn6mr18654997igb.16.1345041493663; Wed, 15 Aug 2012 07:38:13 -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.50.184.200 with SMTP id ew8csp71982igc; Wed, 15 Aug 2012 07:38:12 -0700 (PDT) Received: by 10.180.83.66 with SMTP id o2mr37519309wiy.14.1345041492074; Wed, 15 Aug 2012 07:38:12 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id w84si2220057weq.161.2012.08.15.07.38.11 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 15 Aug 2012 07:38:12 -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 1T1ejb-0005Cu-7k for ; Wed, 15 Aug 2012 14:38:11 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 2D61DE027C for ; Wed, 15 Aug 2012 14:38:11 +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: 372 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 372: split up disable adb over USB from restart adb Message-Id: <20120815143811.8956.86830.launchpad@ackee.canonical.com> Date: Wed, 15 Aug 2012 14:38:11 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="15801"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: f631a48a0126a561d714cf1cde02b7d850d8de0f X-Gm-Message-State: ALoCoQmUAJlvAyyi9rKaEhYG7AapW38vsXLS/TthOkFGYHB9mgh6BlS79Fdoh+W/yRTMHtxydSe1 Merge authors: Alexander Sack (asac) Related merge proposals: https://code.launchpad.net/~asac/lava-dispatcher/boot_linaro_android_image-refactor/+merge/119494 proposed by: Alexander Sack (asac) ------------------------------------------------------------ revno: 372 [merge] committer: Andy Doan branch nick: lava-dispatcher timestamp: Wed 2012-08-15 09:34:54 -0500 message: split up disable adb over USB from restart adb modified: 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 'lava_dispatcher/client/base.py' --- lava_dispatcher/client/base.py 2012-08-08 22:31:12 +0000 +++ lava_dispatcher/client/base.py 2012-08-15 14:34:54 +0000 @@ -452,12 +452,15 @@ self.proc.expect(self.tester_str, timeout=120) #TODO: set up proxy + # we are tcp'ish adb fans here... + self._disable_adb_over_usb() + self._disable_suspend() if self.enable_network_after_boot_android: time.sleep(1) self._enable_network() + self._restart_adb_after_netup() - self._enable_adb_over_tcpip() def _disable_suspend(self): """ disable the suspend of images. @@ -483,14 +486,18 @@ session.run("ifconfig " + self.default_network_interface, timeout=20) - def _enable_adb_over_tcpip(self): - logging.info("Enable adb over TCPIP") + def _restart_adb_after_netup(self): + logging.info("Restart adb after netup") session = TesterCommandRunner(self, wait_for_rc=False) - session.run('echo 0>/sys/class/android_usb/android0/enable') session.run('setprop service.adb.tcp.port 5555') session.run('stop adbd') session.run('start adbd') + def _disable_adb_over_usb(self): + logging.info("Disabling adb over USB") + session = TesterCommandRunner(self, wait_for_rc=False) + session.run('echo 0>/sys/class/android_usb/android0/enable') + class SerialIO(file): def __init__(self, logfile):