[V1] tests/*: removed changing source code before meson build
Checks
Context |
Check |
Description |
ci/Intel-dts-suite-test |
fail
|
Apply issues
|
Commit Message
Signed-off-by: DongJunX <junx.dong@intel.com>
---
framework/project_dpdk.py | 2 +-
tests/TestSuite_ieee1588.py | 7 ++-----
tests/TestSuite_nic_single_core_perf.py | 18 +++++++-----------
tests/TestSuite_power_pbf.py | 8 ++++----
tests/TestSuite_ptpclient.py | 8 +++-----
5 files changed, 17 insertions(+), 26 deletions(-)
@@ -285,7 +285,7 @@ class DPDKdut(Dut):
use_shared_lib = load_global_setting(HOST_SHARED_LIB_SETTING)
shared_lib_path = load_global_setting(HOST_SHARED_LIB_PATH)
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'
kernel_driver = ''
nic_name = ''
if 'Virt' in str(self):
@@ -54,12 +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.send_expect(
- "sed -i -e 's/IEEE1588=n$/IEEE1588=y/' config/common_base", "# ", 30)
- 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.
@@ -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()
@@ -424,11 +425,6 @@ class TestNicSingleCorePerf(TestCase):
"""
Run after each test suite.
"""
- # 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)
+ # resume environment.
+ self.dut.build_install_dpdk(self.target)
self.dut.kill_all()
@@ -150,12 +150,12 @@ class TestPowerPbf(TestCase):
# open debug SW
SW = "CONFIG_RTE_LIBRTE_POWER_DEBUG"
if 'meson' == load_global_setting(HOST_BUILD_TYPE_SETTING):
- self.dut.set_build_options({SW[7:]: 'y'})
+ extra_param = '-Dc_args=-DRTE_LIBRTE_POWER_DEBUG'
else:
- cmd = "sed -i -e 's/{0}=n$/{0}=y/' {1}/config/common_base".format(
- SW, self.target_dir)
+ cmd = "sed -i -e 's/{0}=n$/{0}=y/' {1}/config/common_base".format(SW, self.target_dir)
self.d_a_con(cmd)
- self.dut.build_install_dpdk(self.target)
+ extra_param = ''
+ self.dut.build_install_dpdk(self.target, extra_param=extra_param)
# set up vm power management binary process setting
self.vm_power_mgr = self.prepare_binary('vm_power_manager')
# set up distributor binary process setting
@@ -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)