[dts] [PATCH V1] framework/project_dpdk: add RTE config when build dpdk and apps

Ma, LihongX lihongx.ma at intel.com
Mon Jun 3 10:47:33 CEST 2019


Hi, lijuan
>From the suggest from zhaoyan, I have change the method of this patch , set the env variable when reconnet session, not in the build function.
And I will use the patch "add set_env_variable when reconnet dut" instead of it.
So you can ignore it.

-----Original Message-----
From: Ma, LihongX 
Sent: Monday, May 27, 2019 7:25 AM
To: dts at dpdk.org
Cc: Ma, LihongX <lihongx.ma at intel.com>
Subject: [PATCH V1] framework/project_dpdk: add RTE config when build dpdk and apps

When dts lost the session with DUT, it will try to reconnet to DUT, but it will lose the RTE config, so add the RTE config in the function of build dpdk and apps.

Signed-off-by: lihong <lihongx.ma at intel.com>
---
 framework/project_dpdk.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index 6035c68..7bbd749 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -198,6 +198,8 @@ class DPDKdut(Dut):
         """
         Build DPDK source code with specified target.
         """
+        self.send_expect("export RTE_TARGET=" + target, "#")
+        self.send_expect("export RTE_SDK=`pwd`", "#")
         build_install_dpdk = getattr(self, 'build_install_dpdk_%s' % self.get_os_type())
         build_install_dpdk(target, extra_options)
 
@@ -351,6 +353,8 @@ class DPDKdut(Dut):
         """
         Build dpdk sample applications.
         """
+        self.send_expect("export RTE_TARGET=" + self.target, "#")
+        self.send_expect("export RTE_SDK=`pwd`", "#")
         build_dpdk_apps = getattr(self, 'build_dpdk_apps_%s' % self.get_os_type())
         return build_dpdk_apps(folder, extra_options)
 
--
2.7.4



More information about the dts mailing list