test suite reviews and discussions
 help / color / mirror / Atom feed
From: Jun Dong <junx.dong@intel.com>
To: dts@dpdk.org
Cc: lijuan.tu@intel.com, qingx.sun@intel.com, junx.dong@intel.com
Subject: [dts] [V1] removed changing source code before meson build
Date: Mon, 28 Feb 2022 16:53:36 +0800	[thread overview]
Message-ID: <20220228085336.3999-1-junx.dong@intel.com> (raw)

Signed-off-by: Jun Dong <junx.dong@intel.com>
---
 framework/project_dpdk.py               |  2 +-
 tests/TestSuite_ieee1588.py             |  5 ++---
 tests/TestSuite_nic_single_core_perf.py | 13 +++++--------
 tests/TestSuite_power_pbf.py            |  6 ++----
 tests/TestSuite_ptpclient.py            |  8 +++-----
 5 files changed, 13 insertions(+), 21 deletions(-)

diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index f6cf6aa6..ccdb5814 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -243,7 +243,7 @@ class DPDKdut(Dut):
         """
         use_shared_lib = load_global_setting(HOST_SHARED_LIB_SETTING)
         if use_shared_lib == 'true' and 'Virt' not in str(self):
-            self.set_build_options({'RTE_BUILD_SHARED_LIB': 'y'})
+            extra_options += ' -Dc_args=-DRTE_BUILD_SHARED_LIB'
         if self.get_os_type() == 'linux':
             self.build_install_dpdk_linux_meson(target, extra_options)
         elif self.get_os_type() == 'freebsd':
diff --git a/tests/TestSuite_ieee1588.py b/tests/TestSuite_ieee1588.py
index d61f2a53..837e46ce 100644
--- a/tests/TestSuite_ieee1588.py
+++ b/tests/TestSuite_ieee1588.py
@@ -54,10 +54,9 @@ class TestIeee1588(TestCase):
         dutPorts = self.dut.get_ports()
         self.verify(len(dutPorts) > 0, "No ports found for " + self.nic)
 
-        # Change the config file to support IEEE1588 and recompile the package.
-        self.dut.set_build_options({'RTE_LIBRTE_IEEE1588': 'y'})
+        # recompile the package with extra options of support IEEE1588.
         self.dut.skip_setup = False
-        self.dut.build_install_dpdk(self.target)
+        self.dut.build_install_dpdk(self.target, extra_options='-Dc_args=-DRTE_LIBRTE_IEEE1588')
 
         self.pmdout = PmdOutput(self.dut)
         # For IEEE1588, the full-feature tx path needs to be enabled.
diff --git a/tests/TestSuite_nic_single_core_perf.py b/tests/TestSuite_nic_single_core_perf.py
index e1020895..88f1ad7a 100644
--- a/tests/TestSuite_nic_single_core_perf.py
+++ b/tests/TestSuite_nic_single_core_perf.py
@@ -65,12 +65,13 @@ class TestNicSingleCorePerf(TestCase):
         err_msg = "Rx desc only has 16B and 32B size, %d is not valid" % self.rx_desc_size
         self.verify(self.rx_desc_size == 16 or self.rx_desc_size == 32, err_msg)
         if self.rx_desc_size == 16:
-            # Update DPDK config file and rebuild to get best perf on fortville
+            extra_options = ''
+            # rebuild to get best perf on fortville
             if self.nic in ["fortville_25g", "fortville_spirit"]:
-                self.dut.set_build_options({'RTE_LIBRTE_I40E_16BYTE_RX_DESC': 'y'})
+                extra_options = '-Dc_args=-DRTE_LIBRTE_I40E_16BYTE_RX_DESC'
             elif self.nic in ["columbiaville_100g", "columbiaville_25g", "columbiaville_25gx2"]:
-                self.dut.set_build_options({'RTE_LIBRTE_ICE_16BYTE_RX_DESC': 'y'})
-            self.dut.build_install_dpdk(self.target)
+                extra_options = '-Dc_args=-DRTE_LIBRTE_ICE_16BYTE_RX_DESC'
+            self.dut.build_install_dpdk(self.target, extra_options=extra_options)
 
         # Based on h/w type, choose how many ports to use
         self.dut_ports = self.dut.get_ports()
@@ -426,9 +427,5 @@ class TestNicSingleCorePerf(TestCase):
         """
         # resume setting
         if self.rx_desc_size == 16:
-            if self.nic in ["fortville_25g", "fortville_spirit"]:
-                self.dut.set_build_options({'RTE_LIBRTE_I40E_16BYTE_RX_DESC': 'n'})
-            elif self.nic in ["columbiaville_100g", "columbiaville_25g", "columbiaville_25gx2"]:
-                self.dut.set_build_options({'RTE_LIBRTE_ICE_16BYTE_RX_DESC': 'n'})
             self.dut.build_install_dpdk(self.target)
         self.dut.kill_all()
diff --git a/tests/TestSuite_power_pbf.py b/tests/TestSuite_power_pbf.py
index 94692bc9..f0969fb7 100644
--- a/tests/TestSuite_power_pbf.py
+++ b/tests/TestSuite_power_pbf.py
@@ -144,10 +144,8 @@ class TestPowerPbf(TestCase):
 
     def init_test_binary_file(self):
         self.create_powermonitor_folder()
-        # open debug SW
-        SW = "RTE_LIBRTE_POWER_DEBUG"
-        self.dut.set_build_options({SW: 'y'})
-        self.dut.build_install_dpdk(self.target)
+        # open debug SW when build dpdk
+        self.dut.build_install_dpdk(self.target, extra_param='-Dc_args=-DRTE_LIBRTE_POWER_DEBUG')
         # set up vm power management binary process setting
         self.vm_power_mgr = self.prepare_binary('vm_power_manager')
         # set up distributor binary process setting
diff --git a/tests/TestSuite_ptpclient.py b/tests/TestSuite_ptpclient.py
index f97e211f..45c6a494 100644
--- a/tests/TestSuite_ptpclient.py
+++ b/tests/TestSuite_ptpclient.py
@@ -53,10 +53,9 @@ class TestPtpClient(TestCase):
         dutPorts = self.dut.get_ports()
         self.verify(len(dutPorts) > 0, "No ports found for " + self.nic)
 
-        # Change the config file to support IEEE1588 and recompile the package.
-        self.dut.set_build_options({'RTE_LIBRTE_IEEE1588': 'y'})
+        # recompile the package with extra options of support IEEE1588.
         self.dut.skip_setup = False
-        self.dut.build_install_dpdk(self.target)
+        self.dut.build_install_dpdk(self.target, extra_options='-Dc_args=-DRTE_LIBRTE_IEEE1588')
 
         # build sample app
         out = self.dut.build_dpdk_apps("examples/ptpclient")
@@ -179,6 +178,5 @@ class TestPtpClient(TestCase):
         out = self.dut.send_expect("hwclock", "# ")
         rtc_time = re.findall(r"(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2})", out)[0]
         self.dut.send_command('date -s "%s"' % rtc_time, "# ")
-        # Restore the config file and recompile the package.
-        self.dut.set_build_options({'RTE_LIBRTE_IEEE1588': 'n'})
+        # recompile the package without extra options of support IEEE1588.
         self.dut.build_install_dpdk(self.target)
-- 
2.33.1.windows.1


             reply	other threads:[~2022-02-28  8:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28  8:53 Jun Dong [this message]
2022-03-15  3:14 ` Tu, Lijuan

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=20220228085336.3999-1-junx.dong@intel.com \
    --to=junx.dong@intel.com \
    --cc=dts@dpdk.org \
    --cc=lijuan.tu@intel.com \
    --cc=qingx.sun@intel.com \
    /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).