From: "Chen, Zhaoyan" <zhaoyan.chen@intel.com>
To: "Ma, LihongX" <lihongx.ma@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Chen, Zhaoyan" <zhaoyan.chen@intel.com>
Subject: Re: [dts] [PATCH V1 4/4] framework/project_dpdk: add judge of the value about snapshot_load_side
Date: Thu, 2 Jan 2020 03:23:49 +0000 [thread overview]
Message-ID: <9DEEADBC57E43F4DA73B571777FECECA41E76C66@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1577404987-1369-4-git-send-email-lihongx.ma@intel.com>
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
next prev parent reply other threads:[~2020-01-02 3:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9DEEADBC57E43F4DA73B571777FECECA41E76C66@SHSMSX104.ccr.corp.intel.com \
--to=zhaoyan.chen@intel.com \
--cc=dts@dpdk.org \
--cc=lihongx.ma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).