test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Li, WenjieX A" <wenjiex.a.li@intel.com>
To: "Ma, LihongX" <lihongx.ma@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Chen, Zhaoyan" <zhaoyan.chen@intel.com>,
	"Ma, LihongX" <lihongx.ma@intel.com>
Subject: Re: [dts] [PATCH V1] framework: add set_env_variable when reconnet dut
Date: Thu, 30 May 2019 07:31:06 +0000	[thread overview]
Message-ID: <8688172CD5C0B74590FAE19D9579F94B537062E0@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1559174441-16091-1-git-send-email-lihongx.ma@intel.com>

Reviewed-by: Wenjie <wenjiex.a.li@intel.com>

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
> Sent: Thursday, May 30, 2019 8:01 AM
> To: dts@dpdk.org
> Cc: Chen, Zhaoyan <zhaoyan.chen@intel.com>; Ma, LihongX
> <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V1] framework: add set_env_variable when reconnet dut
> 
> When dts lost the session with DUT, it will try to reconnet to DUT, but it will lose
> the env config, so add the env config when reconnet to DUT.
> 
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>  framework/project_dpdk.py | 11 +++++++----
>  framework/test_case.py    |  1 +
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index
> 6035c68..f113f3e 100644
> --- a/framework/project_dpdk.py
> +++ b/framework/project_dpdk.py
> @@ -64,10 +64,7 @@ class DPDKdut(Dut):
>          self.set_toolchain(target)
> 
>          # set env variable
> -        # These have to be setup all the time. Some tests need to compile
> -        # example apps by themselves and will fail otherwise.
> -        self.send_expect("export RTE_TARGET=" + target, "#")
> -        self.send_expect("export RTE_SDK=`pwd`", "#")
> +        self.set_env_variable()
> 
>          self.set_rxtx_mode()
> 
> @@ -88,6 +85,12 @@ class DPDKdut(Dut):
>              self.bind_interfaces_linux(drivername)
>          self.extra_nic_setup()
> 
> +    def set_env_variable(self):
> +        # These have to be setup all the time. Some tests need to compile
> +        # example apps by themselves and will fail otherwise.
> +        self.send_expect("export RTE_TARGET=" + self.target, "#")
> +        self.send_expect("export RTE_SDK=`pwd`", "#")
> +
>      def setup_modules(self, target, drivername, drivermode):
>          """
>          Install DPDK required kernel module on DUT.
> diff --git a/framework/test_case.py b/framework/test_case.py index
> 27d236b..c028492 100644
> --- a/framework/test_case.py
> +++ b/framework/test_case.py
> @@ -135,6 +135,7 @@ class TestCase(object):
>              crb.reconnect_session()
>              if 'dut' in str(type(crb)):
>                  crb.send_expect("cd %s" % crb.base_dir, "#")
> +                crb.set_env_variable()
> 
>          try:
>              result = crb.alt_session.check_available()
> --
> 2.7.4


  reply	other threads:[~2019-05-30  7:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-30  0:00 lihong
2019-05-30  7:31 ` Li, WenjieX A [this message]
2019-05-30  7:56 ` Chen, Zhaoyan
2019-06-05  2:09 ` 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=8688172CD5C0B74590FAE19D9579F94B537062E0@SHSMSX103.ccr.corp.intel.com \
    --to=wenjiex.a.li@intel.com \
    --cc=dts@dpdk.org \
    --cc=lihongx.ma@intel.com \
    --cc=zhaoyan.chen@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).