[dts] [PATCH V1 2/2]tests/vmdq_dcb:Fix the error of setting parameters before compiling the application

Han, YingyaX yingyax.han at intel.com
Wed Mar 11 04:21:10 CET 2020


Tested_by  Han, YingyaX <yingyax.han at intel.com>


Best regards,
Yingya

-----Original Message-----
From: Han, YingyaX 
Sent: Tuesday, March 10, 2020 5:07 PM
To: dts at dpdk.org; Tu, Lijuan <lijuan.tu at intel.com>
Cc: Han, YingyaX <yingyax.han at intel.com>
Subject: [dts][PATCH V1 2/2]tests/vmdq_dcb:Fix the error of setting parameters before compiling the application

Signed-off-by: hanyingya <yingyax.han at intel.com>
---
 tests/TestSuite_vmdq_dcb.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_vmdq_dcb.py b/tests/TestSuite_vmdq_dcb.py index 8641c7c..44abffc 100644
--- a/tests/TestSuite_vmdq_dcb.py
+++ b/tests/TestSuite_vmdq_dcb.py
@@ -93,9 +93,14 @@ class TestVmdqDcb(TestCase):
         """
         Rebuild dpdk
         """
-        self.dut.send_expect("sed -i -e 's/CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=?/"
-                "CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=%s/' ./config/common_base" % nb_queue_per_vm, "#", 20)
-        self.dut.build_install_dpdk(self.target)
+        out = self.dut.send_expect("grep 'CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM' ./config/common_base", "#", 20)
+        vm_num = re.findall(r'\d+', out)[-1]
+        if str(nb_queue_per_vm) == vm_num:
+            return
+        else:
+            self.dut.send_expect("sed -i -e 's/CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=%s/CONFIG_RTE_LIBRTE_I40E_"
+                             "QUEUE_NUM_PER_VM=%s/' ./config/common_base" % (vm_num, nb_queue_per_vm), "#", 20)
+            self.dut.build_install_dpdk(self.target)
 
     def start_application(self, npools, ntcs):
         """
--
2.17.2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestVmdqDcb.log
Type: application/octet-stream
Size: 190144 bytes
Desc: TestVmdqDcb.log
URL: <http://mails.dpdk.org/archives/dts/attachments/20200311/3568482c/attachment.obj>


More information about the dts mailing list