From patchwork Mon Jan 14 20:57:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Terceiro X-Patchwork-Id: 14031 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 2A57B23E1F for ; Mon, 14 Jan 2013 20:57:19 +0000 (UTC) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by fiordland.canonical.com (Postfix) with ESMTP id B10A2A1914D for ; Mon, 14 Jan 2013 20:57:18 +0000 (UTC) Received: by mail-vb0-f42.google.com with SMTP id fa15so4016336vbb.15 for ; Mon, 14 Jan 2013 12:57:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :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=U/RLNeedMoxt9KqNkPcGCVcuOLPr9WNvHjOGNZ+KAnk=; b=XAPoTcW2xe5jg8katQjKOLSk8aOe9CIVh7ALPe3lxV/+HiPix0RlkmTV/7L8Xjoawf Nv9rD3ler0GpQaN3XoyCv9qUsIb9hoL3ZerszJ/y1G4Iy9ZqOUXrmxlIqJMqDg1Ns/e/ YIRaZ1mnK0ro6HC/HQVvhBp9bnVbhWMXW34KX6ULWwkEGVY+Tfb38wdK5DL7v+/lPz2t TnUxgGQzAxW2JcvfmU/L7gF8u+jyL9evlVcGET4Y5EEpCDkN4tsQMJOPzPxvUJOVcd0I ei8cl3Ct3omzbckaw8aIfDxc39Vv0ORAh4HKBKcYPaLqS11qR/qD+Bg5UEMdNY/WOKZz X8bg== X-Received: by 10.52.88.168 with SMTP id bh8mr88214937vdb.51.1358197038064; Mon, 14 Jan 2013 12:57: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.58.145.101 with SMTP id st5csp79396veb; Mon, 14 Jan 2013 12:57:17 -0800 (PST) X-Received: by 10.194.58.175 with SMTP id s15mr137528984wjq.31.1358197036760; Mon, 14 Jan 2013 12:57:16 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id ew1si385083wib.45.2013.01.14.12.57.14 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 14 Jan 2013 12:57: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 1Tur5m-0005W3-Rz for ; Mon, 14 Jan 2013 20:57:14 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id BE33BE012D for ; Mon, 14 Jan 2013 20:57:14 +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: 528 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 528: wait for prompt properly in lava-test-shell Message-Id: <20130114205714.25880.96851.launchpad@ackee.canonical.com> Date: Mon, 14 Jan 2013 20:57:14 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="16420"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 0a2dba5f9c6fe88211e262a1cfef2c8d663281a4 X-Gm-Message-State: ALoCoQlrFp23bKXlMoaFQwwhpnCl0PTUUzMy+4GkRFWexbYbSa4y5tJT0wWCNEoTAXcPEXYrW/qs Merge authors: Antonio Terceiro (terceiro) Related merge proposals: https://code.launchpad.net/~terceiro/lava-dispatcher/wait-for-prompt/+merge/143143 proposed by: Antonio Terceiro (terceiro) ------------------------------------------------------------ revno: 528 [merge] committer: Antonio Terceiro branch nick: trunk timestamp: Mon 2013-01-14 17:55:48 -0300 message: wait for prompt properly in lava-test-shell modified: lava_dispatcher/actions/lava_test_shell.py 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/actions/lava_test_shell.py' --- lava_dispatcher/actions/lava_test_shell.py 2013-01-09 20:57:25 +0000 +++ lava_dispatcher/actions/lava_test_shell.py 2013-01-14 16:29:38 +0000 @@ -454,7 +454,7 @@ signal_director = SignalDirector(self.client, testdefs_by_uuid) with target.runner() as runner: - runner.run("") # make sure we have a shell prompt + runner.wait_for_prompt(timeout) runner._connection.sendline("%s/bin/lava-test-runner" % target.deployment_data['lava_test_dir']) start = time.time() if timeout == -1: === modified file 'lava_dispatcher/client/base.py' --- lava_dispatcher/client/base.py 2013-01-02 18:55:32 +0000 +++ lava_dispatcher/client/base.py 2013-01-14 16:29:38 +0000 @@ -87,6 +87,9 @@ self.match_id = None self.match = None + def wait_for_prompt(self, timeout = -1): + wait_for_prompt(self._connection, self._prompt_str, timeout) + def run(self, cmd, response=None, timeout=-1, failok=False): """Run `cmd` and wait for a shell response. @@ -121,7 +124,7 @@ self.match_id = None self.match = None - wait_for_prompt(self._connection, self._prompt_str, timeout) + self.wait_for_prompt(timeout) if self._prompt_str_includes_rc: rc = int(self._connection.match.group(1))