From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0461BA0518; Fri, 24 Jul 2020 04:40:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F0FF11D5F7; Fri, 24 Jul 2020 04:40:55 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 4F9901C211 for ; Fri, 24 Jul 2020 04:40:54 +0200 (CEST) IronPort-SDR: rSlAFun/9IDHgyzl7gFbS7Gow4KMV/Bi1HAklQe6FHxopBLky3dtA1RPnTNlyQ11VMZGNwhqPP N0d9lckB5ndg== X-IronPort-AV: E=McAfee;i="6000,8403,9691"; a="235529034" X-IronPort-AV: E=Sophos;i="5.75,389,1589266800"; d="scan'208";a="235529034" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2020 19:40:53 -0700 IronPort-SDR: dhOccUS7X5v4d9V+kGHoUtUouu2jOuZ7yCmJWZtwOSUyJDiYxKPoaTu3yJgdx7gokKvJQC/+FX eyjc0krcCqwQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,389,1589266800"; d="scan'208";a="393186888" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga001.fm.intel.com with ESMTP; 23 Jul 2020 19:40:53 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 23 Jul 2020 19:40:53 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 23 Jul 2020 19:40:52 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.22]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.22]) with mapi id 14.03.0439.000; Fri, 24 Jul 2020 10:40:49 +0800 From: "Tu, Lijuan" To: "Ma, LihongX" , "dts@dpdk.org" , "Zhang, XiX" CC: "Ma, LihongX" Thread-Topic: [dts] [PATCH V1] framework: get apps name of current build type in virt_dut Thread-Index: AQHWXyyK3QZrN81eVUyFHE+yk83uvakWCU7w Date: Fri, 24 Jul 2020 02:40:48 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC84119@SHSMSX101.ccr.corp.intel.com> References: <1595287665-21936-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: <1595287665-21936-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: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] framework: get apps name of current build type in virt_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" Applied, thanks > -----Original Message----- > From: dts On Behalf Of lihong > Sent: 2020=1B$BG/=1B(B7=1B$B7n=1B(B21=1B$BF|=1B(B 7:28 > To: dts@dpdk.org; Zhang, XiX > Cc: Ma, LihongX > Subject: [dts] [PATCH V1] framework: get apps name of current build type = in > virt_dut >=20 > fix dts issue of d8f3830696b54d48e78463, in virt_dut also need get apps_n= ame > from config file >=20 > Signed-off-by: lihong > --- > framework/virt_base.py | 1 + > framework/virt_dut.py | 20 ++++++++++++++++++-- > 2 files changed, 19 insertions(+), 2 deletions(-) >=20 > diff --git a/framework/virt_base.py b/framework/virt_base.py index > c959ca0..b582f85 100644 > --- a/framework/virt_base.py > +++ b/framework/virt_base.py > @@ -460,6 +460,7 @@ class VirtBase(object): >=20 > try: > # setting up dpdk in vm, must call at last > + vm_dut.target =3D self.host_dut.target > vm_dut.prerequisites(self.host_dut.package, self.host_dut.pa= tches, > autodetect_topo) > if set_target: > target =3D self.host_dut.target diff --git a/framework/v= irt_dut.py > b/framework/virt_dut.py index adf486b..03569ba 100644 > --- a/framework/virt_dut.py > +++ b/framework/virt_dut.py > @@ -34,8 +34,8 @@ import re > import time > import settings > from utils import RED, parallel_lock > -from config import PortConf > -from settings import NICS, LOG_NAME_SEP, get_netdev > +from config import PortConf, AppNameConf from settings import NICS, > +LOG_NAME_SEP, get_netdev, load_global_setting, > HOST_BUILD_TYPE_SETTING > from project_dpdk import DPDKdut > from dut import Dut > from net_device import GetNicObj > @@ -76,6 +76,8 @@ class VirtDut(DPDKdut): > self.virttype =3D virttype > self.prefix_subfix =3D str(os.getpid()) + '_' + > time.strftime("%Y%m%d%H%M%S", time.localtime()) > self.prefix_list =3D [] > + self.apps_name_conf =3D {} > + self.apps_name =3D {} >=20 > def init_log(self): > if hasattr(self.host_dut, "test_classname"): > @@ -216,6 +218,20 @@ class VirtDut(DPDKdut): > for port_info in self.ports_info: > self.logger.info(port_info) >=20 > + # load app name conf > + name_cfg =3D AppNameConf() > + self.apps_name_conf =3D name_cfg.load_app_name_conf() > + > + # get apps name of current build type > + build_type =3D load_global_setting(HOST_BUILD_TYPE_SETTING) > + if build_type not in self.apps_name_conf: > + raise Exception('please config the apps name in app_name.cfg= of build > type:%s' % build_type) > + self.apps_name =3D self.apps_name_conf[build_type] > + # use the dut target directory instead of 'target' string in app= name > + for app in self.apps_name: > + cur_app_path =3D self.apps_name[app].replace('target', self.= target) > + self.apps_name[app] =3D cur_app_path + ' ' > + > def init_core_list(self): > self.cores =3D [] > cpuinfo =3D self.send_expect("grep --color=3Dnever \"processor\"= " > -- > 2.7.4