From patchwork Fri Oct 14 19:33:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Larson X-Patchwork-Id: 4689 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 2CE1D23E0C for ; Fri, 14 Oct 2011 19:33:16 +0000 (UTC) Received: from mail-bw0-f52.google.com (mail-bw0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 0A83AA1800E for ; Fri, 14 Oct 2011 19:33:16 +0000 (UTC) Received: by bkbzs2 with SMTP id zs2so2890284bkb.11 for ; Fri, 14 Oct 2011 12:33:15 -0700 (PDT) Received: by 10.223.77.71 with SMTP id f7mr5920307fak.33.1318620795516; Fri, 14 Oct 2011 12:33: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.152.24.41 with SMTP id r9cs27985laf; Fri, 14 Oct 2011 12:33:14 -0700 (PDT) Received: by 10.227.142.140 with SMTP id q12mr3519330wbu.18.1318620793779; Fri, 14 Oct 2011 12:33:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id fd5si7061284wbb.55.2011.10.14.12.33.13 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Oct 2011 12:33: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 1REnVJ-0002JT-3w for ; Fri, 14 Oct 2011 19:33:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 0D5E0E09FA for ; Fri, 14 Oct 2011 19:33:13 +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: 133 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 133: Support Snowball v3 boards in lava-dispatcher Message-Id: <20111014193313.30757.68465.launchpad@ackee.canonical.com> Date: Fri, 14 Oct 2011 19:33:13 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14124"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 2ca0669313014b3483c887aac861f27c0411c230 Merge authors: Paul Larson (pwlars) Related merge proposals: https://code.launchpad.net/~pwlars/lava-dispatcher/snowball-support/+merge/79185 proposed by: Paul Larson (pwlars) ------------------------------------------------------------ revno: 133 [merge] committer: Paul Larson branch nick: lava-dispatcher timestamp: Fri 2011-10-14 14:31:25 -0500 message: Support Snowball v3 boards in lava-dispatcher modified: lava_dispatcher/actions/deploy.py lava_dispatcher/client.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/actions/deploy.py' --- lava_dispatcher/actions/deploy.py 2011-10-14 05:04:20 +0000 +++ lava_dispatcher/actions/deploy.py 2011-10-14 19:31:25 +0000 @@ -156,6 +156,13 @@ rootfs_path = download(rootfs_url, tarball_dir) image_file = os.path.join(tarball_dir, "lava.img") + #XXX Hack for removing startupfiles from snowball hwpacks + if client.device_type == "snowball_sd": + cmd = "sudo linaro-hwpack-replace -r startupfiles-v3 -t %s -i" % hwpack_path + rc, output = getstatusoutput(cmd) + if rc: + raise RuntimeError("linaro-hwpack-replace failed: %s" % output) + cmd = ("sudo flock /var/lock/lava-lmc.lck linaro-media-create --hwpack-force-yes --dev %s " "--image_file %s --binary %s --hwpack %s --image_size 3G" % (client.device_type, image_file, rootfs_path, hwpack_path)) === modified file 'lava_dispatcher/client.py' --- lava_dispatcher/client.py 2011-09-23 02:53:30 +0000 +++ lava_dispatcher/client.py 2011-10-14 19:28:59 +0000 @@ -140,15 +140,22 @@ def soft_reboot(self): self.proc.sendline("reboot") - # set soft reboot timeout 60s, or do a hard reset - id = self.proc.expect(['Restarting system', pexpect.TIMEOUT], - timeout=60) + # set soft reboot timeout 120s, or do a hard reset + id = self.proc.expect(['Will now restart', pexpect.TIMEOUT], + timeout=120) if id != 0: self.hard_reboot() def hard_reboot(self): self.proc.send("~$") self.proc.sendline("hardreset") + # XXX Workaround for snowball + if self.device_type == "snowball_sd": + time.sleep(10) + self.in_master_shell() + # Intentionally avoid self.soft_reboot() to prevent looping + self.proc.sendline("reboot") + self.enter_uboot() def run_shell_command(self, cmd, response=None, timeout=-1): self.empty_pexpect_buffer()