[V1] framework/pmd_output:start_testpmd interface support expected params
Commit Message
According to commit 9af79db20f4cf759b76d08941e7e62f91880892d,
when launch virtio-user testpmd as server mode, virtio-user server side
testpmd expected character will be 'wait for client side started...',
after client side started, it change to 'testpmd>'.
Signed-off-by: Ling Wei <weix.ling@intel.com>
---
framework/pmd_output.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
Tested-by: Wei Ling <weix.ling@intel.com>
Regards,
Ling Wei
> -----Original Message-----
> From: Ling Wei <weix.ling@intel.com>
> Sent: Tuesday, February 2, 2021 09:29 PM
> To: dts@dpdk.org
> Cc: Ling, WeiX <weix.ling@intel.com>
> Subject: [PATCH V1] framework/pmd_output:start_testpmd interface
> support expected params
@@ -103,7 +103,7 @@ class PmdOutput():
def get_pmd_cmd(self):
return self.command
- def start_testpmd(self, cores='default', param='', eal_param='', socket=0, fixed_prefix=False, **config):
+ def start_testpmd(self, cores='default', param='', eal_param='', socket=0, fixed_prefix=False, expected='testpmd> ', **config):
"""
start testpmd with input parameters.
:param cores: eg:
@@ -148,7 +148,7 @@ class PmdOutput():
command = command.replace(' ', ' ')
if self.session != self.dut:
self.session.send_expect("cd %s" % self.dut.base_dir, "# ")
- out = self.session.send_expect(command, "testpmd> ", 120)
+ out = self.session.send_expect(command, expected, 120)
self.command = command
# wait 10s to ensure links getting up before test start.
sleep(10)