test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/TestSuite_vhost_1024_ethports: support meson build
@ 2020-09-17  9:36 JiangYuX
  2020-09-17  9:45 ` Jiang, YuX
  2020-09-23  8:34 ` Tu, Lijuan
  0 siblings, 2 replies; 4+ messages in thread
From: JiangYuX @ 2020-09-17  9:36 UTC (permalink / raw)
  To: dts; +Cc: JiangYu

From: JiangYu <yux.jiang@intel.com>

1, adapt meson build: include app_name, killall app_name, build method
2, optimize checkpoints.

Signed-off-by: JiangYu <yux.jiang@intel.com>
---
 tests/TestSuite_vhost_1024_ethports.py | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/tests/TestSuite_vhost_1024_ethports.py b/tests/TestSuite_vhost_1024_ethports.py
index b764936..afac0fa 100644
--- a/tests/TestSuite_vhost_1024_ethports.py
+++ b/tests/TestSuite_vhost_1024_ethports.py
@@ -52,24 +52,30 @@ class TestVhost1024Ethports(TestCase):
         cores = self.dut.get_core_list("1S/2C/1T")
         self.pci_info = self.dut.ports_info[0]['pci']
         self.build_user_dpdk()
+        self.testpmd_path=self.dut.apps_name['test-pmd']
+        self.testpmd_name = self.testpmd_path.split("/")[-1]
 
     def set_up(self):
         """
         Run before each test case.
         """
         self.dut.send_expect('rm -rf ./vhost-net*', '# ')
-        self.dut.send_expect('killall -s INT testpmd', '# ')
+        self.dut.send_expect('killall -s INT %s' % self.testpmd_name, '# ')
         self.vhost_user = self.dut.new_session(suite='vhost-user')
 
     def build_user_dpdk(self):
-        self.dut.send_expect(
-            "sed -i 's/CONFIG_RTE_MAX_ETHPORTS=32$/CONFIG_RTE_MAX_ETHPORTS=1024/' config/common_base", '#', 30)
-        self.dut.build_install_dpdk(self.target)
+        if self.dut.build_type == "meson":
+            self.dut.build_install_dpdk(self.target, extra_options="-Dmax_ethports=1024")
+        else:
+            self.dut.send_expect("sed -i 's/CONFIG_RTE_MAX_ETHPORTS=32$/CONFIG_RTE_MAX_ETHPORTS=1024/' config/common_base", '#', 30)
+            self.dut.build_install_dpdk(self.target)
 
     def restore_dpdk(self):
-        self.dut.send_expect(
-            "sed -i 's/CONFIG_RTE_MAX_ETHPORTS=1024$/CONFIG_RTE_MAX_ETHPORTS=32/' config/common_base", '#', 30)
-        self.dut.build_install_dpdk(self.target)
+        if self.dut.build_type == "meson":
+            self.dut.build_install_dpdk(self.target, extra_options="-Dmax_ethports=32")
+        else:
+            self.dut.send_expect("sed -i 's/CONFIG_RTE_MAX_ETHPORTS=1024$/CONFIG_RTE_MAX_ETHPORTS=32/' config/common_base", '#', 30)
+            self.dut.build_install_dpdk(self.target)
 
     @property
     def check_2M_env(self):
@@ -88,9 +94,10 @@ class TestVhost1024Ethports(TestCase):
         for ethport in range(self.max_ethport):
             command_line_vdev += '--vdev "eth_vhost%d,iface=vhost-net%d,queues=%d" ' %(ethport, ethport, self.queue)
         eal_params = self.dut.create_eal_parameters(cores="1S/2C/1T", prefix='vhost', ports=[self.pci_info])
-        command_line_client = self.dut.target + '/app/testpmd ' + eal_params + command_line_vdev + ' -- -i'
+        command_line_client = self.testpmd_path + eal_params + command_line_vdev + ' -- -i'
         try:
             out = self.vhost_user.send_expect(command_line_client, 'testpmd> ', 120)
+            self.verify("Failed to create eth_vhost" not in out, "Failed to create some vhost_ethports")
         except Exception as e:
             self.verify(0, 'start testpmd failed')
         self.vhost_user.send_expect("quit", "#", 120)
-- 
2.7.4


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

end of thread, other threads:[~2020-09-23  8:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17  9:36 [dts] [PATCH V1] tests/TestSuite_vhost_1024_ethports: support meson build JiangYuX
2020-09-17  9:45 ` Jiang, YuX
2020-09-22  8:03   ` Ma, LihongX
2020-09-23  8:34 ` Tu, Lijuan

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