test suite reviews and discussions
 help / color / mirror / Atom feed
From: hanyingya <yingyax.han@intel.com>
To: dts@dpdk.org
Cc: hanyingya <yingyax.han@intel.com>
Subject: [dts][PATCH V1]tests/efd: removed changing source code before meson build
Date: Sat,  2 Apr 2022 08:46:06 +0000	[thread overview]
Message-ID: <20220402084606.3777328-1-yingyax.han@intel.com> (raw)

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


             reply	other threads:[~2022-04-02  8:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-02  8:46 hanyingya [this message]
2022-04-06 12:10 ` lijuan.tu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220402084606.3777328-1-yingyax.han@intel.com \
    --to=yingyax.han@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).