[dts] [PATCH] framework/ssh: enable command status checkable for crb

Liu, Yong yong.liu at intel.com
Sun Feb 15 06:35:26 CET 2015


Applied, thx.

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Michael Qiu
> Sent: Sunday, February 15, 2015 1:27 PM
> To: dts at dpdk.org
> Subject: [dts] [PATCH] framework/ssh: enable command status checkable for
> crb
> 
> command status is not checkable now for crb.
> It is useful for crb.
> 
> Signed-off-by: Michael Qiu <michael.qiu at intel.com>
> ---
>  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



More information about the dts mailing list