diff mbox series

[01/38] tests-TestSuite_dpdk_gro_lib.py:support meson build

Message ID 1599207525-22123-1-git-send-email-xix.zhang@intel.com (mailing list archive)
State Accepted
Headers show
Series Modify suite to support meson & makefile | expand

Commit Message

Zhang, XiX Sept. 4, 2020, 8:18 a.m. UTC
Signed-off-by: xizhan4x <xix.zhang@intel.com>
---
 tests/TestSuite_dpdk_gro_lib.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Ma, LihongX Sept. 7, 2020, 5:20 a.m. UTC | #1
Ack-by: LihongX Ma<lihongx.ma@intel.com>

Regards,
Ma,lihong

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of xizhan4x
> Sent: Friday, September 4, 2020 4:18 PM
> To: dts@dpdk.org
> Cc: Zhang, XiX <xix.zhang@intel.com>
> Subject: [dts] [dts 01/38] tests-TestSuite_dpdk_gro_lib.py:support meson
> build
> 
> Signed-off-by: xizhan4x <xix.zhang@intel.com>
> ---
>  tests/TestSuite_dpdk_gro_lib.py | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/TestSuite_dpdk_gro_lib.py
> b/tests/TestSuite_dpdk_gro_lib.py index 49a7407..f2b5b0d 100644
> --- a/tests/TestSuite_dpdk_gro_lib.py
> +++ b/tests/TestSuite_dpdk_gro_lib.py
> @@ -69,6 +69,8 @@ class TestDPDKGROLib(TestCase):
>                      'Pls config the direct connection info in
> vhost_peer_conf.cfg')
>          bind_script_path = self.dut.get_dpdk_bind_script()
>          self.dut.send_expect('%s --bind=%s %s' % (bind_script_path,
> self.def_driver, self.pci), '# ')
> +        self.path=self.dut.apps_name['test-pmd']
> +        self.testpmd_name=self.path.split("/")[-1]
> 
>          # get the numa info about the pci info which config in peer cfg
>          bus = int(self.pci[5:7], base=16) @@ -101,7 +103,7 @@ class
> TestDPDKGROLib(TestCase):
>          #
>          # Clean the execution ENV
>          self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
> -        self.dut.send_expect("killall -s INT testpmd", "#")
> +        self.dut.send_expect("killall -s INT %s" % self.testpmd_name,
> + "#")
>          self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
> 
>      def launch_testpmd_gro_on(self, mode=1):
> @@ -112,7 +114,7 @@ class TestDPDKGROLib(TestCase):
>          # mode 3 : vxlan traffic light mode
>          # mode 4 : tcp traffic flush 4
>          eal_param = self.dut.create_eal_parameters(cores=self.vhost_list,
> vdevs=['net_vhost0,iface=%s/vhost-net,queues=1' % self.base_dir])
> -        self.testcmd_start = self.target + "/app/testpmd " + eal_param + "
> -- -i  --enable-hw-vlan-strip --tx-offloads=0x00 --txd=1024 --rxd=1024"
> +        self.testcmd_start = self.path + eal_param + " -- -i  --enable-hw-
> vlan-strip --tx-offloads=0x00 --txd=1024 --rxd=1024"
>          self.vhost_user = self.dut.new_session(suite="user")
>          self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120)
>          self.vhost_user.send_expect("set fwd csum", "testpmd> ", 120) @@ -
> 378,7 +380,7 @@ class TestDPDKGROLib(TestCase):
>          """
>          Run after each test case.
>          """
> -        self.dut.send_expect("killall -s INT testpmd", "#")
> +        self.dut.send_expect("killall -s INT %s" % self.testpmd_name,
> + "#")
>          self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
>          self.dut.send_expect("rm -rf %s/vhost-net" % self.base_dir, "#")
>          time.sleep(2)
> --
> 1.8.3.1
diff mbox series

Patch

diff --git a/tests/TestSuite_dpdk_gro_lib.py b/tests/TestSuite_dpdk_gro_lib.py
index 49a7407..f2b5b0d 100644
--- a/tests/TestSuite_dpdk_gro_lib.py
+++ b/tests/TestSuite_dpdk_gro_lib.py
@@ -69,6 +69,8 @@  class TestDPDKGROLib(TestCase):
                     'Pls config the direct connection info in vhost_peer_conf.cfg')
         bind_script_path = self.dut.get_dpdk_bind_script()
         self.dut.send_expect('%s --bind=%s %s' % (bind_script_path, self.def_driver, self.pci), '# ')
+        self.path=self.dut.apps_name['test-pmd']
+        self.testpmd_name=self.path.split("/")[-1]
 
         # get the numa info about the pci info which config in peer cfg
         bus = int(self.pci[5:7], base=16)
@@ -101,7 +103,7 @@  class TestDPDKGROLib(TestCase):
         #
         # Clean the execution ENV
         self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
-        self.dut.send_expect("killall -s INT testpmd", "#")
+        self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#")
         self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
 
     def launch_testpmd_gro_on(self, mode=1):
@@ -112,7 +114,7 @@  class TestDPDKGROLib(TestCase):
         # mode 3 : vxlan traffic light mode
         # mode 4 : tcp traffic flush 4
         eal_param = self.dut.create_eal_parameters(cores=self.vhost_list, vdevs=['net_vhost0,iface=%s/vhost-net,queues=1' % self.base_dir])
-        self.testcmd_start = self.target + "/app/testpmd " + eal_param + " -- -i  --enable-hw-vlan-strip --tx-offloads=0x00 --txd=1024 --rxd=1024"
+        self.testcmd_start = self.path + eal_param + " -- -i  --enable-hw-vlan-strip --tx-offloads=0x00 --txd=1024 --rxd=1024"
         self.vhost_user = self.dut.new_session(suite="user")
         self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120)
         self.vhost_user.send_expect("set fwd csum", "testpmd> ", 120)
@@ -378,7 +380,7 @@  class TestDPDKGROLib(TestCase):
         """
         Run after each test case.
         """
-        self.dut.send_expect("killall -s INT testpmd", "#")
+        self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#")
         self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
         self.dut.send_expect("rm -rf %s/vhost-net" % self.base_dir, "#")
         time.sleep(2)