From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 0C1EBB54D for ; Sun, 15 Feb 2015 06:35:31 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 14 Feb 2015 21:31:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,579,1418112000"; d="scan'208";a="652357128" Received: from pgsmsx104.gar.corp.intel.com ([10.221.44.91]) by orsmga001.jf.intel.com with ESMTP; 14 Feb 2015 21:35:29 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by PGSMSX104.gar.corp.intel.com (10.221.44.91) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sun, 15 Feb 2015 13:35:28 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.197]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.192]) with mapi id 14.03.0195.001; Sun, 15 Feb 2015 13:35:27 +0800 From: "Liu, Yong" To: "Qiu, Michael" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH] framework/ssh: enable command status checkable for crb Thread-Index: AQHQSOARWx+kYIfe1k2MkevLaRQ3V5zxMHLA Date: Sun, 15 Feb 2015 05:35:26 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10D7CD5C@SHSMSX103.ccr.corp.intel.com> References: <1423978023-5381-1-git-send-email-michael.qiu@intel.com> In-Reply-To: <1423978023-5381-1-git-send-email-michael.qiu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH] framework/ssh: enable command status checkable for crb X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2015 05:35:32 -0000 Applied, thx. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Michael Qiu > Sent: Sunday, February 15, 2015 1:27 PM > To: dts@dpdk.org > Subject: [dts] [PATCH] framework/ssh: enable command status checkable for > crb >=20 > command status is not checkable now for crb. > It is useful for crb. >=20 > Signed-off-by: Michael Qiu > --- > framework/crb.py | 8 +++++--- > framework/ssh_pexpect.py | 2 +- > 2 files changed, 6 insertions(+), 4 deletions(-) >=20 > diff --git a/framework/crb.py b/framework/crb.py > index fa03757..317be15 100644 > --- a/framework/crb.py > +++ b/framework/crb.py > @@ -55,7 +55,8 @@ class Crb(object): > self.serializer =3D serializer > self.ports_info =3D None >=20 > - def send_expect(self, cmds, expected, timeout=3DTIMEOUT, > alt_session=3DFalse): > + def send_expect(self, cmds, expected, timeout=3DTIMEOUT, > + alt_session=3DFalse, verify=3DFalse): > """ > Send commands to crb and return string before expected string. I= f > there's no expected string found before timeout, TimeoutExceptio= n > will > @@ -63,9 +64,10 @@ class Crb(object): > """ >=20 > if alt_session: > - return self.alt_session.session.send_expect(cmds, expected, > timeout) > + return self.alt_session.session.send_expect(cmds, expected, > + timeout, verify) >=20 > - return self.session.send_expect(cmds, expected, timeout) > + return self.session.send_expect(cmds, expected, timeout, verify) >=20 > def set_test_types(self, func_tests, perf_tests): > """ > diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py > index 7e5c8fc..d293fe2 100644 > --- a/framework/ssh_pexpect.py > +++ b/framework/ssh_pexpect.py > @@ -42,7 +42,7 @@ class SSHPexpect(object): > if not int(ret_status): > return ret > else: > - self.logger.error("Command: %s failure!" % command) > + self.logger.error("Command: %s failure!" % command) > return -1 > else: > return ret > -- > 1.9.3