From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A0299A034F; Mon, 17 Jan 2022 03:13:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4CFA240683; Mon, 17 Jan 2022 03:13:12 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id A6D304067B for ; Mon, 17 Jan 2022 03:13:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642385590; x=1673921590; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=IeQcT8QlFNLdrkEsIlPNW+Pi59mL8USkDuhXsatXXFw=; b=oF4lEzB66iNkhVNkB5cbjlKmiNiilfIbzdY5mvecrdTF0rhlFuyKfEZH hPdc8Ls5X3XVQxY87rhIsGHbmJ8cFrvJGjFS195gGUzAj+Z6UDKOw7XHy 4YKxTyF5ZR0ADpPgTeODQ8eHn2fh/Mz7VW2RpmxhN3W+yzcF61E9wIB9o qTj64ZHNrteuYYUPAt7lqLJu5JfpPFfl9PGxgcbbVjS52E49pIpIIIR2E nhQ49IBo0WKakAdU0qP2rdVHq7k7JHE3UJEvXhEZkAFi62Y1itradONsr V67v9fUBIuOlM/7a1Fu3zairlIoIAFiVpg2cLEvdDt8DzjunHQZc+FdOw g==; X-IronPort-AV: E=McAfee;i="6200,9189,10229"; a="305269986" X-IronPort-AV: E=Sophos;i="5.88,294,1635231600"; d="scan'208";a="305269986" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2022 18:13:09 -0800 X-IronPort-AV: E=Sophos;i="5.88,294,1635231600"; d="scan'208";a="594678467" Received: from shwdenpg197.ccr.corp.intel.com ([10.253.109.35]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2022 18:13:06 -0800 From: DongJunX To: dts@dpdk.org Cc: lijuan.tu@intel.com, qingx.sun@intel.com, junx.dong@intel.com Subject: [DTS] [V1] tests/*: removed changing source code before meson build Date: Mon, 17 Jan 2022 10:13:00 +0800 Message-Id: <20220117021300.4104-1-junx.dong@intel.com> X-Mailer: git-send-email 2.33.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Signed-off-by: DongJunX --- 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(-) diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index 9927bcc1..7f3c8d1f 100644 --- a/framework/project_dpdk.py +++ b/framework/project_dpdk.py @@ -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): diff --git a/tests/TestSuite_ieee1588.py b/tests/TestSuite_ieee1588.py index e17b1699..cbb562d3 100644 --- a/tests/TestSuite_ieee1588.py +++ b/tests/TestSuite_ieee1588.py @@ -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. diff --git a/tests/TestSuite_nic_single_core_perf.py b/tests/TestSuite_nic_single_core_perf.py index 1012dbf3..57616b9e 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() @@ -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() diff --git a/tests/TestSuite_power_pbf.py b/tests/TestSuite_power_pbf.py index 42d939cd..e1456899 100644 --- a/tests/TestSuite_power_pbf.py +++ b/tests/TestSuite_power_pbf.py @@ -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 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