From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id F2F27A045E for ; Thu, 30 May 2019 09:31:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B49B34CA6; Thu, 30 May 2019 09:31:14 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 71144375B for ; Thu, 30 May 2019 09:31:12 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 May 2019 00:31:11 -0700 X-ExtLoop1: 1 Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga006.jf.intel.com with ESMTP; 30 May 2019 00:31:10 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 30 May 2019 00:31:11 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 30 May 2019 00:31:10 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.120]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.137]) with mapi id 14.03.0415.000; Thu, 30 May 2019 15:31:07 +0800 From: "Li, WenjieX A" To: "Ma, LihongX" , "dts@dpdk.org" CC: "Chen, Zhaoyan" , "Ma, LihongX" Thread-Topic: [dts] [PATCH V1] framework: add set_env_variable when reconnet dut Thread-Index: AQHVFrhx2gU4L58mU0uCdZjJ0M14cqaDRZug Date: Thu, 30 May 2019 07:31:06 +0000 Message-ID: <8688172CD5C0B74590FAE19D9579F94B537062E0@SHSMSX103.ccr.corp.intel.com> References: <1559174441-16091-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: <1559174441-16091-1-git-send-email-lihongx.ma@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] framework: add set_env_variable when reconnet dut X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Reviewed-by: Wenjie > -----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 ; Ma, LihongX > > Subject: [dts] [PATCH V1] framework: add set_env_variable when reconnet d= ut >=20 > When dts lost the session with DUT, it will try to reconnet to DUT, but i= t will lose > the env config, so add the env config when reconnet to DUT. >=20 > Signed-off-by: lihong > --- > framework/project_dpdk.py | 11 +++++++---- > framework/test_case.py | 1 + > 2 files changed, 8 insertions(+), 4 deletions(-) >=20 > 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) >=20 > # set env variable > - # These have to be setup all the time. Some tests need to compil= e > - # example apps by themselves and will fail otherwise. > - self.send_expect("export RTE_TARGET=3D" + target, "#") > - self.send_expect("export RTE_SDK=3D`pwd`", "#") > + self.set_env_variable() >=20 > self.set_rxtx_mode() >=20 > @@ -88,6 +85,12 @@ class DPDKdut(Dut): > self.bind_interfaces_linux(drivername) > self.extra_nic_setup() >=20 > + def set_env_variable(self): > + # These have to be setup all the time. Some tests need to compil= e > + # example apps by themselves and will fail otherwise. > + self.send_expect("export RTE_TARGET=3D" + self.target, "#") > + self.send_expect("export RTE_SDK=3D`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() >=20 > try: > result =3D crb.alt_session.check_available() > -- > 2.7.4