test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH 1/2] framework: modify the method get_session_before
@ 2020-03-08 15:23 xinfengx
  2020-03-08 15:23 ` [dts] [PATCH 2/2] framework: replace unnecessary send_command with send_expect xinfengx
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: xinfengx @ 2020-03-08 15:23 UTC (permalink / raw)
  To: dts; +Cc: xinfengx

Signed-off-by: xinfengx <xinfengx.zhao@intel.com>
---
 framework/ssh_pexpect.py | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py
index 8889016..e851cbf 100644
--- a/framework/ssh_pexpect.py
+++ b/framework/ssh_pexpect.py
@@ -109,16 +109,11 @@ class SSHPexpect:
         """
         ignore_keyintr()
         self.session.PROMPT = self.magic_prompt
-        try:
-            self.session.prompt(timeout)
-        except Exception as e:
-            pass
-
+        output = self.session.try_read_prompt(timeout)
         aware_keyintr()
-        before = self.get_output_all()
         self.__flush()
 
-        return before
+        return output
 
     def __flush(self):
         """
-- 
2.17.1


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

* [dts] [PATCH 2/2] framework: replace unnecessary send_command with send_expect
  2020-03-08 15:23 [dts] [PATCH 1/2] framework: modify the method get_session_before xinfengx
@ 2020-03-08 15:23 ` xinfengx
  2020-03-11  7:36   ` Zhao, XinfengX
  2020-03-20  5:07 ` [dts] [PATCH 1/2] framework: modify the method get_session_before Xiao, QimaiX
  2020-03-20  8:23 ` Tu, Lijuan
  2 siblings, 1 reply; 5+ messages in thread
From: xinfengx @ 2020-03-08 15:23 UTC (permalink / raw)
  To: dts; +Cc: xinfengx

Signed-off-by: xinfengx <xinfengx.zhao@intel.com>
---
 framework/project_dpdk.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index 4c57e81..9ac3b1a 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -451,8 +451,8 @@ class DPDKdut(Dut):
         """
         Get RTE configuration from config/defconfig_*.
         """
-        out = self.session.send_command("cat config/defconfig_%s | sed '/^#/d' | sed '/^\s*$/d'"
-                                        % self.target, 1)
+        out = self.send_expect("cat config/defconfig_%s | sed '/^#/d' | sed '/^\s*$/d'"
+                                        % self.target, "# ")
 
         def_rte_config = re.findall(config+'=(\S+)', out)
         if def_rte_config:
-- 
2.17.1


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

* Re: [dts] [PATCH 2/2] framework: replace unnecessary send_command with send_expect
  2020-03-08 15:23 ` [dts] [PATCH 2/2] framework: replace unnecessary send_command with send_expect xinfengx
@ 2020-03-11  7:36   ` Zhao, XinfengX
  0 siblings, 0 replies; 5+ messages in thread
From: Zhao, XinfengX @ 2020-03-11  7:36 UTC (permalink / raw)
  To: dts

Tested-by:  Zhao, Xinfeng<xinfengx.zhao@intel.com>

-----Original Message-----
From: Zhao, XinfengX 
Sent: Sunday, March 8, 2020 11:23 PM
To: dts@dpdk.org
Cc: Zhao, XinfengX <xinfengx.zhao@intel.com>
Subject: [dts][PATCH 2/2] framework: replace unnecessary send_command with send_expect

Signed-off-by: xinfengx <xinfengx.zhao@intel.com>
---
 framework/project_dpdk.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index 4c57e81..9ac3b1a 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -451,8 +451,8 @@ class DPDKdut(Dut):
         """
         Get RTE configuration from config/defconfig_*.
         """
-        out = self.session.send_command("cat config/defconfig_%s | sed '/^#/d' | sed '/^\s*$/d'"
-                                        % self.target, 1)
+        out = self.send_expect("cat config/defconfig_%s | sed '/^#/d' | sed '/^\s*$/d'"
+                                        % self.target, "# ")
 
         def_rte_config = re.findall(config+'=(\S+)', out)
         if def_rte_config:
--
2.17.1


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

* Re: [dts] [PATCH 1/2] framework: modify the method get_session_before
  2020-03-08 15:23 [dts] [PATCH 1/2] framework: modify the method get_session_before xinfengx
  2020-03-08 15:23 ` [dts] [PATCH 2/2] framework: replace unnecessary send_command with send_expect xinfengx
@ 2020-03-20  5:07 ` Xiao, QimaiX
  2020-03-20  8:23 ` Tu, Lijuan
  2 siblings, 0 replies; 5+ messages in thread
From: Xiao, QimaiX @ 2020-03-20  5:07 UTC (permalink / raw)
  To: Zhao, XinfengX, dts; +Cc: Zhao, XinfengX

Tested-by: Xiao, QimaiX <qimaix.xiao@intel.com>

Regards,
Xiao Qimai

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xinfengx
> Sent: Sunday, March 8, 2020 11:23 PM
> To: dts@dpdk.org
> Cc: Zhao, XinfengX <xinfengx.zhao@intel.com>
> Subject: [dts] [PATCH 1/2] framework: modify the method
> get_session_before
> 
> Signed-off-by: xinfengx <xinfengx.zhao@intel.com>
> ---
>  framework/ssh_pexpect.py | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py index
> 8889016..e851cbf 100644
> --- a/framework/ssh_pexpect.py
> +++ b/framework/ssh_pexpect.py
> @@ -109,16 +109,11 @@ class SSHPexpect:
>          """
>          ignore_keyintr()
>          self.session.PROMPT = self.magic_prompt
> -        try:
> -            self.session.prompt(timeout)
> -        except Exception as e:
> -            pass
> -
> +        output = self.session.try_read_prompt(timeout)
>          aware_keyintr()
> -        before = self.get_output_all()
>          self.__flush()
> 
> -        return before
> +        return output
> 
>      def __flush(self):
>          """
> --
> 2.17.1


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

* Re: [dts] [PATCH 1/2] framework: modify the method get_session_before
  2020-03-08 15:23 [dts] [PATCH 1/2] framework: modify the method get_session_before xinfengx
  2020-03-08 15:23 ` [dts] [PATCH 2/2] framework: replace unnecessary send_command with send_expect xinfengx
  2020-03-20  5:07 ` [dts] [PATCH 1/2] framework: modify the method get_session_before Xiao, QimaiX
@ 2020-03-20  8:23 ` Tu, Lijuan
  2 siblings, 0 replies; 5+ messages in thread
From: Tu, Lijuan @ 2020-03-20  8:23 UTC (permalink / raw)
  To: Zhao, XinfengX, dts; +Cc: Zhao, XinfengX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xinfengx
> Sent: Sunday, March 8, 2020 11:23 PM
> To: dts@dpdk.org
> Cc: Zhao, XinfengX <xinfengx.zhao@intel.com>
> Subject: [dts] [PATCH 1/2] framework: modify the method
> get_session_before
> 
> Signed-off-by: xinfengx <xinfengx.zhao@intel.com>
> ---
>  framework/ssh_pexpect.py | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py index
> 8889016..e851cbf 100644
> --- a/framework/ssh_pexpect.py
> +++ b/framework/ssh_pexpect.py
> @@ -109,16 +109,11 @@ class SSHPexpect:
>          """
>          ignore_keyintr()
>          self.session.PROMPT = self.magic_prompt
> -        try:
> -            self.session.prompt(timeout)
> -        except Exception as e:
> -            pass
> -
> +        output = self.session.try_read_prompt(timeout)
>          aware_keyintr()
> -        before = self.get_output_all()
>          self.__flush()
> 
> -        return before
> +        return output
> 
>      def __flush(self):
>          """
> --
> 2.17.1


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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-08 15:23 [dts] [PATCH 1/2] framework: modify the method get_session_before xinfengx
2020-03-08 15:23 ` [dts] [PATCH 2/2] framework: replace unnecessary send_command with send_expect xinfengx
2020-03-11  7:36   ` Zhao, XinfengX
2020-03-20  5:07 ` [dts] [PATCH 1/2] framework: modify the method get_session_before Xiao, QimaiX
2020-03-20  8:23 ` Tu, Lijuan

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox