test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] framework/ssh: enable command status checkable for crb
@ 2015-02-15  5:27 Michael Qiu
  2015-02-15  5:35 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Qiu @ 2015-02-15  5:27 UTC (permalink / raw)
  To: dts

command status is not checkable now for crb.
It is useful for crb.

Signed-off-by: Michael Qiu <michael.qiu@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH] framework/ssh: enable command status checkable for crb
  2015-02-15  5:27 [dts] [PATCH] framework/ssh: enable command status checkable for crb Michael Qiu
@ 2015-02-15  5:35 ` Liu, Yong
  0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2015-02-15  5:35 UTC (permalink / raw)
  To: Qiu, Michael, dts

Applied, thx.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Michael Qiu
> Sent: Sunday, February 15, 2015 1:27 PM
> To: dts@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@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-15  5:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-15  5:27 [dts] [PATCH] framework/ssh: enable command status checkable for crb Michael Qiu
2015-02-15  5:35 ` Liu, Yong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).