From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2DF4CA3160 for ; Sat, 12 Oct 2019 11:52:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EA17C1E9FD; Sat, 12 Oct 2019 11:52:17 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 2F3251E9C5 for ; Sat, 12 Oct 2019 11:52:15 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2019 02:52:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,287,1566889200"; d="scan'208";a="224586069" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by fmsmga002.fm.intel.com with ESMTP; 12 Oct 2019 02:52:13 -0700 From: Haiyang Zhao To: dts@dpdk.org Cc: Haiyang Zhao Date: Sat, 12 Oct 2019 17:57:19 +0800 Message-Id: <1570874241-92780-1-git-send-email-haiyangx.zhao@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1 1/3] framework/pmd_output:fix a bug in execute_cmd 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" *.when session is not a dut instance, function send_expect has no keyword arg alt_session. Signed-off-by: Haiyang Zhao --- framework/pmd_output.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/pmd_output.py b/framework/pmd_output.py index bcb3865..13dd6f1 100644 --- a/framework/pmd_output.py +++ b/framework/pmd_output.py @@ -183,8 +183,11 @@ class PmdOutput(): def execute_cmd(self, pmd_cmd, expected='testpmd> ', timeout=TIMEOUT, alt_session=False): - return self.session.send_expect('%s' % pmd_cmd, expected, timeout=timeout, + if 'dut' in str(self.session): + return self.session.send_expect('%s' % pmd_cmd, expected, timeout=timeout, alt_session=alt_session) + else: + return self.session.send_expect('%s' % pmd_cmd, expected, timeout=timeout) def get_output(self, timeout=1): if 'dut' in str(self.session): -- 1.8.3.1