From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 1D107B54D for ; Sun, 15 Feb 2015 06:27:10 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 14 Feb 2015 21:27:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,579,1418112000"; d="scan'208";a="666562608" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 14 Feb 2015 21:27:08 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t1F5R6X0023325; Sun, 15 Feb 2015 13:27:06 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t1F5R4ti005416; Sun, 15 Feb 2015 13:27:06 +0800 Received: (from dayuqiu@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t1F5R4s7005412; Sun, 15 Feb 2015 13:27:04 +0800 From: Michael Qiu To: dts@dpdk.org Date: Sun, 15 Feb 2015 13:27:03 +0800 Message-Id: <1423978023-5381-1-git-send-email-michael.qiu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [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:27:11 -0000 command status is not checkable now for crb. It is useful for crb. Signed-off-by: Michael Qiu --- framework/crb.py | 8 +++++--- framework/ssh_pexpect.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) 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 = serializer self.ports_info = None - def send_expect(self, cmds, expected, timeout=TIMEOUT, alt_session=False): + def send_expect(self, cmds, expected, timeout=TIMEOUT, + alt_session=False, verify=False): """ Send commands to crb and return string before expected string. If there's no expected string found before timeout, TimeoutException will @@ -63,9 +64,10 @@ class Crb(object): """ if alt_session: - return self.alt_session.session.send_expect(cmds, expected, timeout) + return self.alt_session.session.send_expect(cmds, expected, + timeout, verify) - return self.session.send_expect(cmds, expected, timeout) + return self.session.send_expect(cmds, expected, timeout, verify) 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