diff mbox series

[V1,1/3] framework/*:add dcf mode into execution file

Message ID 20220809112507.8567-1-zhiminx.huang@intel.com (mailing list archive)
State Superseded
Headers show
Series [V1,1/3] framework/*:add dcf mode into execution file | expand

Commit Message

Zhimin Huang Aug. 9, 2022, 11:25 a.m. UTC
add dcf_mode parm into execution file configuration.
if take dcf mode,add dcf_mode=enable into execution.cfg.

Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 framework/dts.py      | 6 ++++++
 framework/settings.py | 1 +
 2 files changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/framework/dts.py b/framework/dts.py
index a894c461..a8e670b5 100644
--- a/framework/dts.py
+++ b/framework/dts.py
@@ -141,7 +141,13 @@  def dts_parse_config(config, section):
     except:
         rx_mode = "default"
 
+    try:
+        dcf_mode = config.get(section, "dcf_mode").strip().lower()
+    except:
+        dcf_mode = ""
+
     settings.save_global_setting(settings.DPDK_RXMODE_SETTING, rx_mode)
+    settings.save_global_setting(settings.DPDK_DCFMODE_SETTING, dcf_mode)
 
     for suite in test_suites:
         if suite == "":
diff --git a/framework/settings.py b/framework/settings.py
index 2e7bcfa5..65029668 100644
--- a/framework/settings.py
+++ b/framework/settings.py
@@ -235,6 +235,7 @@  HOST_SHARED_LIB_PATH = "DTS_HOST_SHARED_LIB_PATH"
 DEBUG_SETTING = "DTS_DEBUG_ENABLE"
 DEBUG_CASE_SETTING = "DTS_DEBUGCASE_ENABLE"
 DPDK_RXMODE_SETTING = "DTS_DPDK_RXMODE"
+DPDK_DCFMODE_SETTING = "DTS_DPDK_DCFMODE"
 DTS_ERROR_ENV = "DTS_RUNNING_ERROR"
 DTS_CFG_FOLDER = "DTS_CFG_FOLDER"
 DTS_PARALLEL_SETTING = "DTS_PARALLEL_ENABLE"