[dts] [PATCH V1 1/3] framework/pmd_output:fix a bug in execute_cmd
Haiyang Zhao
haiyangx.zhao at intel.com
Sat Oct 12 11:57:19 CEST 2019
*.when session is not a dut instance,
function send_expect has no keyword arg alt_session.
Signed-off-by: Haiyang Zhao <haiyangx.zhao at intel.com>
---
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
More information about the dts
mailing list