From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Ma, LihongX" <lihongx.ma@intel.com>,
"dts@dpdk.org" <dts@dpdk.org>, "Zhang, XiX" <xix.zhang@intel.com>
Cc: "Ma, LihongX" <lihongx.ma@intel.com>
Subject: Re: [dts] [PATCH V1] framework: get apps name of current build type in virt_dut
Date: Fri, 24 Jul 2020 02:40:48 +0000 [thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC84119@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1595287665-21936-1-git-send-email-lihongx.ma@intel.com>
Applied, thanks
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of lihong
> Sent: 2020年7月21日 7:28
> To: dts@dpdk.org; Zhang, XiX <xix.zhang@intel.com>
> Cc: Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V1] framework: get apps name of current build type in
> virt_dut
>
> fix dts issue of d8f3830696b54d48e78463, in virt_dut also need get apps_name
> from config file
>
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
> framework/virt_base.py | 1 +
> framework/virt_dut.py | 20 ++++++++++++++++++--
> 2 files changed, 19 insertions(+), 2 deletions(-)
>
> 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):
>
> try:
> # setting up dpdk in vm, must call at last
> + vm_dut.target = self.host_dut.target
> vm_dut.prerequisites(self.host_dut.package, self.host_dut.patches,
> autodetect_topo)
> if set_target:
> target = self.host_dut.target diff --git a/framework/virt_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 = virttype
> self.prefix_subfix = str(os.getpid()) + '_' +
> time.strftime("%Y%m%d%H%M%S", time.localtime())
> self.prefix_list = []
> + self.apps_name_conf = {}
> + self.apps_name = {}
>
> 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)
>
> + # load app name conf
> + name_cfg = AppNameConf()
> + self.apps_name_conf = name_cfg.load_app_name_conf()
> +
> + # get apps name of current build type
> + build_type = 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 = 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 = self.apps_name[app].replace('target', self.target)
> + self.apps_name[app] = cur_app_path + ' '
> +
> def init_core_list(self):
> self.cores = []
> cpuinfo = self.send_expect("grep --color=never \"processor\""
> --
> 2.7.4
prev parent reply other threads:[~2020-07-24 2:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 23:27 lihong
2020-07-21 7:09 ` Zhang, XiX
2020-07-24 2:40 ` Tu, Lijuan [this message]
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=8CE3E05A3F976642AAB0F4675D0AD20E0BC84119@SHSMSX101.ccr.corp.intel.com \
--to=lijuan.tu@intel.com \
--cc=dts@dpdk.org \
--cc=lihongx.ma@intel.com \
--cc=xix.zhang@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).