test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V1 1/4] conf/crbs: add param which can config the dpdk tar side
@ 2019-12-27  0:03 lihong
  2019-12-27  0:03 ` [dts] [PATCH V1 2/4] framework/ssh: add params to ssh scp function lihong
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: lihong @ 2019-12-27  0:03 UTC (permalink / raw)
  To: dts; +Cc: zhaoyan.chen, lihong

the params snapshot_load_side can config 'tester' or 'dut',
when snapshot_load_side=tester, it will copy dpdk.tar.gz from tester,
when snapshot_load_side=dut, it will copy dpdk.tar.gz from dut.
the dpdk.tar.gz default on tester, and default path is dts/dep,
if config snapshot_load_side=dut, should use --snapshot to specify a
absolute path of dpdk.tar.gz on dut when start dts.

Signed-off-by: lihong <lihongx.ma@intel.com>
---
 conf/crbs.cfg | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/conf/crbs.cfg b/conf/crbs.cfg
index 5209555..2e6c948 100644
--- a/conf/crbs.cfg
+++ b/conf/crbs.cfg
@@ -11,6 +11,9 @@
 #  channels: Board channel number
 #  bypass_core0: Whether by pass core0
 #  dut_cores: DUT core list, eg: 1,2,3,4,5,18-22
+#  snapshot_load_side: tester/dut, specify the dpdk.tar.gz on side
+#       if value is dut, should combine the params --snapshot to use.
+#       eg: ./dts --snapshot /root/tester/dpdk.tar.gz
 [DUT IP1]
 dut_ip=xxx.xxx.xxx.xxx
 dut_user=root
@@ -24,6 +27,7 @@ pktgen_group=
 channels=4
 bypass_core0=True
 dut_cores=
+snapshot_load_side=tester
 [DUT IP2]
 dut_ip=yyy.yyy.yyy.yyy
 dut_user=root
@@ -36,4 +40,5 @@ ixia_group=
 pktgen_group=
 channels=4
 bypass_core0=True
-dut_cores=
\ No newline at end of file
+dut_cores=
+snapshot_load_side=tester
-- 
2.7.4


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

* [dts] [PATCH V1 2/4] framework/ssh: add params to ssh scp function
  2019-12-27  0:03 [dts] [PATCH V1 1/4] conf/crbs: add param which can config the dpdk tar side lihong
@ 2019-12-27  0:03 ` lihong
  2020-01-02  3:23   ` Chen, Zhaoyan
  2019-12-27  0:03 ` [dts] [PATCH V1 3/4] framework/config: read config value of snapshot_load_side lihong
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: lihong @ 2019-12-27  0:03 UTC (permalink / raw)
  To: dts; +Cc: zhaoyan.chen, lihong

add parameter crb_session to copy_file_from/to, when the parameter
is not None, will copy file from/to the crb session, otherwise will
copy file from/to current dts env.

Signed-off-by: lihong <lihongx.ma@intel.com>
---
 framework/ssh_connection.py |  8 ++++----
 framework/ssh_pexpect.py    | 27 +++++++++++++++++----------
 2 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/framework/ssh_connection.py b/framework/ssh_connection.py
index 312139e..afeef1c 100644
--- a/framework/ssh_connection.py
+++ b/framework/ssh_connection.py
@@ -108,8 +108,8 @@ class SSHConnection(object):
 
         return True
 
-    def copy_file_from(self, src, dst=".", password=''):
-        self.session.copy_file_from(src, dst, password)
+    def copy_file_from(self, src, dst=".", password='', crb_session=None):
+        self.session.copy_file_from(src, dst, password, crb_session)
 
-    def copy_file_to(self, src, dst="~/", password=''):
-        self.session.copy_file_to(src, dst, password)
+    def copy_file_to(self, src, dst="~/", password='', crb_session=None):
+        self.session.copy_file_to(src, dst, password, crb_session)
diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py
index df8da8a..979327c 100644
--- a/framework/ssh_pexpect.py
+++ b/framework/ssh_pexpect.py
@@ -163,7 +163,7 @@ class SSHPexpect(object):
     def isalive(self):
         return self.session.isalive()
 
-    def copy_file_from(self, src, dst=".", password=''):
+    def copy_file_from(self, src, dst=".", password='', crb_session=None):
         """
         Copies a file from a remote place into local.
         """
@@ -172,11 +172,11 @@ class SSHPexpect(object):
             command = 'scp -v -P {0} -o NoHostAuthenticationForLocalhost=yes {1}@{2}:{3} {4}'.format(
                 str(self.port), self.username, self.ip, src, dst)
         if password == '':
-            self._spawn_scp(command, self.password)
+            self._spawn_scp(command, self.password, crb_session)
         else:
-            self._spawn_scp(command, password)
+            self._spawn_scp(command, password, crb_session)
 
-    def copy_file_to(self, src, dst="~/", password=''):
+    def copy_file_to(self, src, dst="~/", password='', crb_session=None):
         """
         Sends a local file to a remote place.
         """
@@ -188,16 +188,23 @@ class SSHPexpect(object):
             command = 'scp -v {0} {1}@{2}:{3}'.format(
                 src, self.username, self.host, dst)
         if password == '':
-            self._spawn_scp(command, self.password)
+            self._spawn_scp(command, self.password, crb_session)
         else:
-            self._spawn_scp(command, password)
+            self._spawn_scp(command, password, crb_session)
 
-    def _spawn_scp(self, scp_cmd, password):
+    def _spawn_scp(self, scp_cmd, password, crb_session):
         """
         Transfer a file with SCP
         """
         self.logger.info(scp_cmd)
-        p = pexpect.spawn(scp_cmd)
+        # if crb_session is not None, copy file from/to crb env
+        # if crb_session is None, copy file from/to current dts env
+        if crb_session is not None:
+            crb_session.session.clean_session()
+            crb_session.session.__sendline(scp_cmd)
+            p = crb_session.session.session
+        else:
+            p = pexpect.spawn(scp_cmd)
         time.sleep(0.5)
         ssh_newkey = 'Are you sure you want to continue connecting'
         i = p.expect([ssh_newkey, '[pP]assword', "# ", pexpect.EOF,
@@ -212,5 +219,5 @@ class SSHPexpect(object):
             p.expect("Exit status 0", 60)
         if i == 4:
             self.logger.error("SCP TIMEOUT error %d" % i)
-
-        p.close()
+        if crb_session is None:
+            p.close()
-- 
2.7.4


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

* [dts] [PATCH V1 3/4] framework/config: read config value of snapshot_load_side
  2019-12-27  0:03 [dts] [PATCH V1 1/4] conf/crbs: add param which can config the dpdk tar side lihong
  2019-12-27  0:03 ` [dts] [PATCH V1 2/4] framework/ssh: add params to ssh scp function lihong
@ 2019-12-27  0:03 ` lihong
  2020-01-02  3:23   ` Chen, Zhaoyan
  2019-12-27  0:03 ` [dts] [PATCH V1 4/4] framework/project_dpdk: add judge of the value about snapshot_load_side lihong
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: lihong @ 2019-12-27  0:03 UTC (permalink / raw)
  To: dts; +Cc: zhaoyan.chen, lihong

Signed-off-by: lihong <lihongx.ma@intel.com>
---
 framework/config.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/framework/config.py b/framework/config.py
index 7a8ca48..4b6c2ba 100644
--- a/framework/config.py
+++ b/framework/config.py
@@ -266,7 +266,8 @@ class CrbsConf(UserConf):
                'pass': '', 'tester IP': '', 'tester pass': '',
                IXIA: None, 'memory channels': 4,
                PKTGEN: None,
-               'bypass core0': True, 'dut_cores': ''}
+               'bypass core0': True, 'dut_cores': '',
+               'snapshot_load_side': 'tester'}
 
     def __init__(self, crbs_conf=CRBCONF):
         self.config_file = crbs_conf
@@ -324,6 +325,8 @@ class CrbsConf(UserConf):
                     crb['dut arch'] = value
                 elif key == 'dut_cores':
                     crb['dut_cores'] = value
+                elif key == 'snapshot_load_side':
+                    crb['snapshot_load_side'] = value.lower()
 
             self.crbs_cfg.append(crb)
         return self.crbs_cfg
-- 
2.7.4


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

* [dts] [PATCH V1 4/4] framework/project_dpdk: add judge of the value about snapshot_load_side
  2019-12-27  0:03 [dts] [PATCH V1 1/4] conf/crbs: add param which can config the dpdk tar side lihong
  2019-12-27  0:03 ` [dts] [PATCH V1 2/4] framework/ssh: add params to ssh scp function lihong
  2019-12-27  0:03 ` [dts] [PATCH V1 3/4] framework/config: read config value of snapshot_load_side lihong
@ 2019-12-27  0:03 ` lihong
  2020-01-02  3:23   ` Chen, Zhaoyan
  2019-12-31  6:43 ` [dts] [PATCH V1 1/4] conf/crbs: add param which can config the dpdk tar side Chen, Zhaoyan
  2020-01-02  3:28 ` Tu, Lijuan
  4 siblings, 1 reply; 9+ messages in thread
From: lihong @ 2019-12-27  0:03 UTC (permalink / raw)
  To: dts; +Cc: zhaoyan.chen, lihong

Signed-off-by: lihong <lihongx.ma@intel.com>
---
 framework/project_dpdk.py | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index ddad526..3a0a449 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -259,7 +259,23 @@ class DPDKdut(Dut):
 
     def prepare_package(self):
         if not self.skip_setup:
-            assert (os.path.isfile(self.package) is True), "Invalid package"
+            session_info = None
+            # if snapshot_load_side=dut, will copy the dpdk tar from dut side
+            # and will judge whether the path of tar is existed on dut
+            if self.crb['snapshot_load_side'] == 'dut':
+                if not os.path.isabs(self.package):
+                    raise ValueError("As snapshot_load_side=dut, will copy dpdk.tar "
+                                    "from dut, please specify a abs path use params "
+                                    "--snapshot when run dts")
+                # if ':' in session, this is vm dut, use the dut session
+                if ':' in self.session.name:
+                    session_info = self.host_dut.alt_session
+                else:
+                     session_info = self.alt_session
+                out = session_info.send_expect('ls -F %s' % self.package, '# ')
+                assert (out == self.package), "Invalid package"
+            else:
+               assert (os.path.isfile(self.package) is True), "Invalid package"
 
             p_dir, _ = os.path.split(self.base_dir)
             # ToDo: make this configurable
@@ -271,7 +287,7 @@ class DPDKdut(Dut):
                 raise ValueError("Directory %s or %s does not exist,"
                                  "please check params -d"
                                  % (p_dir, dst_dir))
-            self.session.copy_file_to(self.package, dst_dir)
+            self.session.copy_file_to(self.package, dst_dir, crb_session=session_info)
 
             # put patches to p_dir/patches/
             if (self.patches is not None):
-- 
2.7.4


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

* Re: [dts] [PATCH V1 1/4] conf/crbs: add param which can config the dpdk tar side
  2019-12-27  0:03 [dts] [PATCH V1 1/4] conf/crbs: add param which can config the dpdk tar side lihong
                   ` (2 preceding siblings ...)
  2019-12-27  0:03 ` [dts] [PATCH V1 4/4] framework/project_dpdk: add judge of the value about snapshot_load_side lihong
@ 2019-12-31  6:43 ` Chen, Zhaoyan
  2020-01-02  3:28 ` Tu, Lijuan
  4 siblings, 0 replies; 9+ messages in thread
From: Chen, Zhaoyan @ 2019-12-31  6:43 UTC (permalink / raw)
  To: Ma, LihongX, dts; +Cc: Chen, Zhaoyan

Acked-by: Zhaoyan Chen <zhaoyan.chen@intel.com>



Regards,
Zhaoyan Chen

> -----Original Message-----
> From: Ma, LihongX <lihongx.ma@intel.com>
> Sent: Friday, December 27, 2019 8:03 AM
> To: dts@dpdk.org
> Cc: Chen, Zhaoyan <zhaoyan.chen@intel.com>; Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts][PATCH V1 1/4] conf/crbs: add param which can config the dpdk tar
> side
> 
> the params snapshot_load_side can config 'tester' or 'dut', when
> snapshot_load_side=tester, it will copy dpdk.tar.gz from tester, when
> snapshot_load_side=dut, it will copy dpdk.tar.gz from dut.
> the dpdk.tar.gz default on tester, and default path is dts/dep, if config
> snapshot_load_side=dut, should use --snapshot to specify a absolute path of
> dpdk.tar.gz on dut when start dts.
> 
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>  conf/crbs.cfg | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/conf/crbs.cfg b/conf/crbs.cfg index 5209555..2e6c948 100644
> --- a/conf/crbs.cfg
> +++ b/conf/crbs.cfg
> @@ -11,6 +11,9 @@
>  #  channels: Board channel number
>  #  bypass_core0: Whether by pass core0
>  #  dut_cores: DUT core list, eg: 1,2,3,4,5,18-22
> +#  snapshot_load_side: tester/dut, specify the dpdk.tar.gz on side
> +#       if value is dut, should combine the params --snapshot to use.
> +#       eg: ./dts --snapshot /root/tester/dpdk.tar.gz
>  [DUT IP1]
>  dut_ip=xxx.xxx.xxx.xxx
>  dut_user=root
> @@ -24,6 +27,7 @@ pktgen_group=
>  channels=4
>  bypass_core0=True
>  dut_cores=
> +snapshot_load_side=tester
>  [DUT IP2]
>  dut_ip=yyy.yyy.yyy.yyy
>  dut_user=root
> @@ -36,4 +40,5 @@ ixia_group=
>  pktgen_group=
>  channels=4
>  bypass_core0=True
> -dut_cores=
> \ No newline at end of file
> +dut_cores=
> +snapshot_load_side=tester
> --
> 2.7.4


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

* Re: [dts] [PATCH V1 2/4] framework/ssh: add params to ssh scp function
  2019-12-27  0:03 ` [dts] [PATCH V1 2/4] framework/ssh: add params to ssh scp function lihong
@ 2020-01-02  3:23   ` Chen, Zhaoyan
  0 siblings, 0 replies; 9+ messages in thread
From: Chen, Zhaoyan @ 2020-01-02  3:23 UTC (permalink / raw)
  To: Ma, LihongX, dts; +Cc: Chen, Zhaoyan

Acked-by: Zhaoyan Chen <zhaoyan.chen@intel.com>



Regards,
Zhaoyan Chen

> -----Original Message-----
> From: Ma, LihongX <lihongx.ma@intel.com>
> Sent: Friday, December 27, 2019 8:03 AM
> To: dts@dpdk.org
> Cc: Chen, Zhaoyan <zhaoyan.chen@intel.com>; Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts][PATCH V1 2/4] framework/ssh: add params to ssh scp function
> 
> add parameter crb_session to copy_file_from/to, when the parameter is not None,
> will copy file from/to the crb session, otherwise will copy file from/to current dts
> env.
> 
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>  framework/ssh_connection.py |  8 ++++----
>  framework/ssh_pexpect.py    | 27 +++++++++++++++++----------
>  2 files changed, 21 insertions(+), 14 deletions(-)
> 
> diff --git a/framework/ssh_connection.py b/framework/ssh_connection.py index
> 312139e..afeef1c 100644
> --- a/framework/ssh_connection.py
> +++ b/framework/ssh_connection.py
> @@ -108,8 +108,8 @@ class SSHConnection(object):
> 
>          return True
> 
> -    def copy_file_from(self, src, dst=".", password=''):
> -        self.session.copy_file_from(src, dst, password)
> +    def copy_file_from(self, src, dst=".", password='', crb_session=None):
> +        self.session.copy_file_from(src, dst, password, crb_session)
> 
> -    def copy_file_to(self, src, dst="~/", password=''):
> -        self.session.copy_file_to(src, dst, password)
> +    def copy_file_to(self, src, dst="~/", password='', crb_session=None):
> +        self.session.copy_file_to(src, dst, password, crb_session)
> diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py index
> df8da8a..979327c 100644
> --- a/framework/ssh_pexpect.py
> +++ b/framework/ssh_pexpect.py
> @@ -163,7 +163,7 @@ class SSHPexpect(object):
>      def isalive(self):
>          return self.session.isalive()
> 
> -    def copy_file_from(self, src, dst=".", password=''):
> +    def copy_file_from(self, src, dst=".", password='', crb_session=None):
>          """
>          Copies a file from a remote place into local.
>          """
> @@ -172,11 +172,11 @@ class SSHPexpect(object):
>              command = 'scp -v -P {0} -o NoHostAuthenticationForLocalhost=yes
> {1}@{2}:{3} {4}'.format(
>                  str(self.port), self.username, self.ip, src, dst)
>          if password == '':
> -            self._spawn_scp(command, self.password)
> +            self._spawn_scp(command, self.password, crb_session)
>          else:
> -            self._spawn_scp(command, password)
> +            self._spawn_scp(command, password, crb_session)
> 
> -    def copy_file_to(self, src, dst="~/", password=''):
> +    def copy_file_to(self, src, dst="~/", password='', crb_session=None):
>          """
>          Sends a local file to a remote place.
>          """
> @@ -188,16 +188,23 @@ class SSHPexpect(object):
>              command = 'scp -v {0} {1}@{2}:{3}'.format(
>                  src, self.username, self.host, dst)
>          if password == '':
> -            self._spawn_scp(command, self.password)
> +            self._spawn_scp(command, self.password, crb_session)
>          else:
> -            self._spawn_scp(command, password)
> +            self._spawn_scp(command, password, crb_session)
> 
> -    def _spawn_scp(self, scp_cmd, password):
> +    def _spawn_scp(self, scp_cmd, password, crb_session):
>          """
>          Transfer a file with SCP
>          """
>          self.logger.info(scp_cmd)
> -        p = pexpect.spawn(scp_cmd)
> +        # if crb_session is not None, copy file from/to crb env
> +        # if crb_session is None, copy file from/to current dts env
> +        if crb_session is not None:
> +            crb_session.session.clean_session()
> +            crb_session.session.__sendline(scp_cmd)
> +            p = crb_session.session.session
> +        else:
> +            p = pexpect.spawn(scp_cmd)
>          time.sleep(0.5)
>          ssh_newkey = 'Are you sure you want to continue connecting'
>          i = p.expect([ssh_newkey, '[pP]assword', "# ", pexpect.EOF, @@ -212,5 +219,5
> @@ class SSHPexpect(object):
>              p.expect("Exit status 0", 60)
>          if i == 4:
>              self.logger.error("SCP TIMEOUT error %d" % i)
> -
> -        p.close()
> +        if crb_session is None:
> +            p.close()
> --
> 2.7.4


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

* Re: [dts] [PATCH V1 3/4] framework/config: read config value of snapshot_load_side
  2019-12-27  0:03 ` [dts] [PATCH V1 3/4] framework/config: read config value of snapshot_load_side lihong
@ 2020-01-02  3:23   ` Chen, Zhaoyan
  0 siblings, 0 replies; 9+ messages in thread
From: Chen, Zhaoyan @ 2020-01-02  3:23 UTC (permalink / raw)
  To: Ma, LihongX, dts; +Cc: Chen, Zhaoyan

Acked-by: Zhaoyan Chen <zhaoyan.chen@intel.com>



Regards,
Zhaoyan Chen

> -----Original Message-----
> From: Ma, LihongX <lihongx.ma@intel.com>
> Sent: Friday, December 27, 2019 8:03 AM
> To: dts@dpdk.org
> Cc: Chen, Zhaoyan <zhaoyan.chen@intel.com>; Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts][PATCH V1 3/4] framework/config: read config value of
> snapshot_load_side
> 
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>  framework/config.py | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/framework/config.py b/framework/config.py index 7a8ca48..4b6c2ba
> 100644
> --- a/framework/config.py
> +++ b/framework/config.py
> @@ -266,7 +266,8 @@ class CrbsConf(UserConf):
>                 'pass': '', 'tester IP': '', 'tester pass': '',
>                 IXIA: None, 'memory channels': 4,
>                 PKTGEN: None,
> -               'bypass core0': True, 'dut_cores': ''}
> +               'bypass core0': True, 'dut_cores': '',
> +               'snapshot_load_side': 'tester'}
> 
>      def __init__(self, crbs_conf=CRBCONF):
>          self.config_file = crbs_conf
> @@ -324,6 +325,8 @@ class CrbsConf(UserConf):
>                      crb['dut arch'] = value
>                  elif key == 'dut_cores':
>                      crb['dut_cores'] = value
> +                elif key == 'snapshot_load_side':
> +                    crb['snapshot_load_side'] = value.lower()
> 
>              self.crbs_cfg.append(crb)
>          return self.crbs_cfg
> --
> 2.7.4


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

* Re: [dts] [PATCH V1 4/4] framework/project_dpdk: add judge of the value about snapshot_load_side
  2019-12-27  0:03 ` [dts] [PATCH V1 4/4] framework/project_dpdk: add judge of the value about snapshot_load_side lihong
@ 2020-01-02  3:23   ` Chen, Zhaoyan
  0 siblings, 0 replies; 9+ messages in thread
From: Chen, Zhaoyan @ 2020-01-02  3:23 UTC (permalink / raw)
  To: Ma, LihongX, dts; +Cc: Chen, Zhaoyan

Acked-by: Zhaoyan Chen <zhaoyan.chen@intel.com>



Regards,
Zhaoyan Chen

> -----Original Message-----
> From: Ma, LihongX <lihongx.ma@intel.com>
> Sent: Friday, December 27, 2019 8:03 AM
> To: dts@dpdk.org
> Cc: Chen, Zhaoyan <zhaoyan.chen@intel.com>; Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts][PATCH V1 4/4] framework/project_dpdk: add judge of the value about
> snapshot_load_side
> 
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>  framework/project_dpdk.py | 20 ++++++++++++++++++--
>  1 file changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index
> ddad526..3a0a449 100644
> --- a/framework/project_dpdk.py
> +++ b/framework/project_dpdk.py
> @@ -259,7 +259,23 @@ class DPDKdut(Dut):
> 
>      def prepare_package(self):
>          if not self.skip_setup:
> -            assert (os.path.isfile(self.package) is True), "Invalid package"
> +            session_info = None
> +            # if snapshot_load_side=dut, will copy the dpdk tar from dut side
> +            # and will judge whether the path of tar is existed on dut
> +            if self.crb['snapshot_load_side'] == 'dut':
> +                if not os.path.isabs(self.package):
> +                    raise ValueError("As snapshot_load_side=dut, will copy dpdk.tar "
> +                                    "from dut, please specify a abs path use params "
> +                                    "--snapshot when run dts")
> +                # if ':' in session, this is vm dut, use the dut session
> +                if ':' in self.session.name:
> +                    session_info = self.host_dut.alt_session
> +                else:
> +                     session_info = self.alt_session
> +                out = session_info.send_expect('ls -F %s' % self.package, '# ')
> +                assert (out == self.package), "Invalid package"
> +            else:
> +               assert (os.path.isfile(self.package) is True), "Invalid package"
> 
>              p_dir, _ = os.path.split(self.base_dir)
>              # ToDo: make this configurable @@ -271,7 +287,7 @@ class DPDKdut(Dut):
>                  raise ValueError("Directory %s or %s does not exist,"
>                                   "please check params -d"
>                                   % (p_dir, dst_dir))
> -            self.session.copy_file_to(self.package, dst_dir)
> +            self.session.copy_file_to(self.package, dst_dir,
> + crb_session=session_info)
> 
>              # put patches to p_dir/patches/
>              if (self.patches is not None):
> --
> 2.7.4


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

* Re: [dts] [PATCH V1 1/4] conf/crbs: add param which can config the dpdk tar side
  2019-12-27  0:03 [dts] [PATCH V1 1/4] conf/crbs: add param which can config the dpdk tar side lihong
                   ` (3 preceding siblings ...)
  2019-12-31  6:43 ` [dts] [PATCH V1 1/4] conf/crbs: add param which can config the dpdk tar side Chen, Zhaoyan
@ 2020-01-02  3:28 ` Tu, Lijuan
  4 siblings, 0 replies; 9+ messages in thread
From: Tu, Lijuan @ 2020-01-02  3:28 UTC (permalink / raw)
  To: Ma, LihongX, dts; +Cc: Chen, Zhaoyan, Ma, LihongX

Applied the series, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
> Sent: Friday, December 27, 2019 8:03 AM
> To: dts@dpdk.org
> Cc: Chen, Zhaoyan <zhaoyan.chen@intel.com>; Ma, LihongX
> <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V1 1/4] conf/crbs: add param which can config the
> dpdk tar side
> 
> the params snapshot_load_side can config 'tester' or 'dut', when
> snapshot_load_side=tester, it will copy dpdk.tar.gz from tester, when
> snapshot_load_side=dut, it will copy dpdk.tar.gz from dut.
> the dpdk.tar.gz default on tester, and default path is dts/dep, if config
> snapshot_load_side=dut, should use --snapshot to specify a absolute path of
> dpdk.tar.gz on dut when start dts.
> 
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>  conf/crbs.cfg | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/conf/crbs.cfg b/conf/crbs.cfg index 5209555..2e6c948 100644
> --- a/conf/crbs.cfg
> +++ b/conf/crbs.cfg
> @@ -11,6 +11,9 @@
>  #  channels: Board channel number
>  #  bypass_core0: Whether by pass core0
>  #  dut_cores: DUT core list, eg: 1,2,3,4,5,18-22
> +#  snapshot_load_side: tester/dut, specify the dpdk.tar.gz on side
> +#       if value is dut, should combine the params --snapshot to use.
> +#       eg: ./dts --snapshot /root/tester/dpdk.tar.gz
>  [DUT IP1]
>  dut_ip=xxx.xxx.xxx.xxx
>  dut_user=root
> @@ -24,6 +27,7 @@ pktgen_group=
>  channels=4
>  bypass_core0=True
>  dut_cores=
> +snapshot_load_side=tester
>  [DUT IP2]
>  dut_ip=yyy.yyy.yyy.yyy
>  dut_user=root
> @@ -36,4 +40,5 @@ ixia_group=
>  pktgen_group=
>  channels=4
>  bypass_core0=True
> -dut_cores=
> \ No newline at end of file
> +dut_cores=
> +snapshot_load_side=tester
> --
> 2.7.4


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

end of thread, back to index

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-27  0:03 [dts] [PATCH V1 1/4] conf/crbs: add param which can config the dpdk tar side lihong
2019-12-27  0:03 ` [dts] [PATCH V1 2/4] framework/ssh: add params to ssh scp function lihong
2020-01-02  3:23   ` Chen, Zhaoyan
2019-12-27  0:03 ` [dts] [PATCH V1 3/4] framework/config: read config value of snapshot_load_side lihong
2020-01-02  3:23   ` Chen, Zhaoyan
2019-12-27  0:03 ` [dts] [PATCH V1 4/4] framework/project_dpdk: add judge of the value about snapshot_load_side lihong
2020-01-02  3:23   ` Chen, Zhaoyan
2019-12-31  6:43 ` [dts] [PATCH V1 1/4] conf/crbs: add param which can config the dpdk tar side Chen, Zhaoyan
2020-01-02  3:28 ` 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