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 9AE20A0512; Wed, 15 Jan 2020 10:06:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 88BE81C037; Wed, 15 Jan 2020 10:06:58 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id C388F1BFC3 for ; Wed, 15 Jan 2020 10:06:56 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2020 01:06:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,322,1574150400"; d="scan'208";a="242810263" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by orsmga002.jf.intel.com with ESMTP; 15 Jan 2020 01:06:55 -0800 From: Haiyang Zhao To: dts@dpdk.org Cc: zhaoyan.chen@intel.com, Haiyang Zhao Date: Wed, 15 Jan 2020 17:12:24 +0800 Message-Id: <1579079547-52758-2-git-send-email-haiyangx.zhao@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1579079547-52758-1-git-send-email-haiyangx.zhao@intel.com> References: <1579079547-52758-1-git-send-email-haiyangx.zhao@intel.com> Subject: [dts] [PATCH V1 2/5] framework/dts:add parameters parse for shared library 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" *.save shared lib parameters into settings. Signed-off-by: Haiyang Zhao --- 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