test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1]tests/efd: removed changing source code before meson build
@ 2022-04-02  8:46 hanyingya
  2022-04-06 12:10 ` lijuan.tu
  0 siblings, 1 reply; 2+ messages in thread
From: hanyingya @ 2022-04-02  8:46 UTC (permalink / raw)
  To: dts; +Cc: hanyingya

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(-)

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):
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-06 12:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-02  8:46 [dts][PATCH V1]tests/efd: removed changing source code before meson build hanyingya
2022-04-06 12:10 ` lijuan.tu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).