test suite reviews and discussions
 help / color / mirror / Atom feed
From: Haiyang Zhao <haiyangx.zhao@intel.com>
To: dts@dpdk.org
Cc: zhaoyan.chen@intel.com, Haiyang Zhao <haiyangx.zhao@intel.com>
Subject: [dts] [PATCH V1 2/5] framework/dts:add parameters parse for shared library
Date: Wed, 15 Jan 2020 17:12:24 +0800	[thread overview]
Message-ID: <1579079547-52758-2-git-send-email-haiyangx.zhao@intel.com> (raw)
In-Reply-To: <1579079547-52758-1-git-send-email-haiyangx.zhao@intel.com>

 *.save shared lib parameters into settings.

Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
 framework/dts.py | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/framework/dts.py b/framework/dts.py
index 634a569..26836a9 100644
--- a/framework/dts.py
+++ b/framework/dts.py
@@ -79,6 +79,14 @@ def dts_parse_param(config, section):
     performance = False
     functional = False
     # Set parameters
+    shared_lib_parameters = ''
+    try:
+        shared_lib_parameters = config.get(section, 'shared_lib_param')
+    except Exception as e:
+        log_handler.info("{}".format(e))
+        shared_lib_parameters = ''
+    shared_lib_parameters = shared_lib_parameters.split(':')
+
     parameters = config.get(section, 'parameters').split(':')
     drivername = config.get(section, 'drivername').split('=')[-1]
 
@@ -92,6 +100,21 @@ def dts_parse_param(config, section):
 
     settings.save_global_setting(settings.HOST_DRIVER_SETTING, drivername)
 
+    shared_lib_paramDict = dict()
+    for param in shared_lib_parameters:
+        (key, _, value) = param.partition('=')
+        shared_lib_paramDict[key] = value
+    if 'use_shared_lib' in shared_lib_paramDict and shared_lib_paramDict['use_shared_lib'].lower() == 'true':
+        settings.save_global_setting(settings.HOST_SHARED_LIB_SETTING, 'true')
+    else:
+        settings.save_global_setting(settings.HOST_SHARED_LIB_SETTING, 'false')
+
+    if 'shared_lib_path' in shared_lib_paramDict:
+        if not shared_lib_paramDict['shared_lib_path'] \
+                and settings.load_global_setting(settings.HOST_SHARED_LIB_SETTING):
+            raise ValueError("use shared lib but shared lib path is empty")
+        settings.save_global_setting(settings.HOST_SHARED_LIB_PATH, shared_lib_paramDict['shared_lib_path'])
+
     paramDict = dict()
     for param in parameters:
         (key, _, value) = param.partition('=')
-- 
1.8.3.1


  reply	other threads:[~2020-01-15  9:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15  9:12 [dts] [PATCH V1 1/5] framework/settings:add two global variable " Haiyang Zhao
2020-01-15  9:12 ` Haiyang Zhao [this message]
2020-01-15  9:12 ` [dts] [PATCH V1 3/5] framework/dut:add -d parameters in create_eal_parameters when use shared mode Haiyang Zhao
2020-01-15  9:12 ` [dts] [PATCH V1 4/5] framework/project_dpdk:set shared lib in config/common_base " Haiyang Zhao
2020-01-15  9:12 ` [dts] [PATCH V1 5/5] framework/virt_dut:optimize code Haiyang Zhao
2020-01-16  6:02 ` [dts] [PATCH V1 1/5] framework/settings:add two global variable for shared library 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=1579079547-52758-2-git-send-email-haiyangx.zhao@intel.com \
    --to=haiyangx.zhao@intel.com \
    --cc=dts@dpdk.org \
    --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).