[V1] tests/efd: removed changing source code before meson build

Message ID 20220402084606.3777328-1-yingyax.han@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] tests/efd: removed changing source code before meson build |

Checks

Context Check Description
ci/Intel-dts-doc-test success Testing OK
ci/Intel-dts-suite-test fail Testing issues

Commit Message

Yingya Han April 2, 2022, 8:46 a.m. UTC
Signed-off-by: hanyingya <yingyax.han@intel.com>
---
 test_plans/efd_test_plan.rst |  3 ++-
 tests/TestSuite_efd.py       | 15 ++++-----------
 2 files changed, 6 insertions(+), 12 deletions(-)
  

Comments

Tu, Lijuan April 6, 2022, 12:10 p.m. UTC | #1
On Sat,  2 Apr 2022 08:46:06 +0000, hanyingya <yingyax.han@intel.com> wrote:
> Signed-off-by: hanyingya <yingyax.han@intel.com>

Acked-by: Lijuan Tu <lijuan.tu@intel.com>
Applied, thanks
  

Patch

diff --git a/test_plans/efd_test_plan.rst b/test_plans/efd_test_plan.rst
index 3f2ef3a3..bb4043ad 100644
--- a/test_plans/efd_test_plan.rst
+++ b/test_plans/efd_test_plan.rst
@@ -138,7 +138,8 @@  This case will measure the performance based on flow numbers.
 Test Case: Load balancer performance based on value bits
 -----------------------------------------------------------------------
 Modify different value size which must be between 1 and 32, and it need
-set the '#define RTE_EFD_VALUE_NUM_BITS (value size)' in lib/librte_efd/rte_efd.h and rebuild dpdk.
+to be configured with the ``-Dc_args=-DRTE_EFD_VALUE_NUM_BITS`` option
+at compile time.
 
 This case will measure the performance based on value bits.
 
diff --git a/tests/TestSuite_efd.py b/tests/TestSuite_efd.py
index 282ce27e..107a8d55 100644
--- a/tests/TestSuite_efd.py
+++ b/tests/TestSuite_efd.py
@@ -159,23 +159,16 @@  class TestEFD(TestCase):
         # perf of different value bit lengths
         for val_bitnum in val_bitnums:
             # change value length and rebuild dpdk
-            self.dut.send_expect(
-                "sed -i -e 's/#define RTE_EFD_VALUE_NUM_BITS .*$/#define RTE_EFD_VALUE_NUM_BITS (%d)/' lib/librte_efd/rte_efd.h"
-                % val_bitnum,
-                "#",
-            )
-            self.dut.build_install_dpdk(self.target)
+            extra_options = "-Dc_args=-DRTE_EFD_VALUE_NUM_BITS=%d" % val_bitnum
+            self.dut.build_install_dpdk(self.target, extra_options=extra_options)
             self.build_server_node_efd()
 
             pps = self._efd_perf_evaluate(2, flow_num)
             self.result_table_add([val_bitnum, 2, "2M", pps])
 
         self.result_table_print()
-        self.dut.send_expect(
-            "sed -i -e 's/#define RTE_EFD_VALUE_NUM_BITS .*$/#define RTE_EFD_VALUE_NUM_BITS (8)/' lib/librte_efd/rte_efd.h",
-            "#",
-        )
-        self.dut.build_install_dpdk(self.target)
+        extra_options = "-Dc_args=-DRTE_EFD_VALUE_NUM_BITS=8"
+        self.dut.build_install_dpdk(self.target, extra_options=extra_options)
         self.build_server_node_efd()
 
     def _efd_perf_evaluate(self, node_num, flow_num):