diff mbox series

[35/38] tests/TestSuite_softnic.py:support meson build

Message ID 1599207525-22123-35-git-send-email-xix.zhang@intel.com (mailing list archive)
State Changes Requested
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_softnic.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/tests/TestSuite_softnic.py b/tests/TestSuite_softnic.py
index c6ba6b9..dee163e 100644
--- a/tests/TestSuite_softnic.py
+++ b/tests/TestSuite_softnic.py
@@ -75,7 +75,8 @@  class TestSoftnic(TestCase):
         self.dut.session.copy_file_to(self.firmware, self.root_path)
         self.dut.session.copy_file_to(self.tm_firmware, self.root_path)
         self.dut.session.copy_file_to(self.nat_firmware, self.root_path)
-        self.cmd = "./%s/app/testpmd -c 0x7 -s 0x4 -n 4 --vdev 'net_softnic0,firmware=/tmp/%s,cpu_id=1,conn_port=8086' -- -i --forward-mode=softnic --portmask=0x2"
+        self.path=self.dut.apps_name['test-pmd']
+        self.cmd = "%s -c 0x7 -s 0x4 -n 4 --vdev 'net_softnic0,firmware=/tmp/%s,cpu_id=1,conn_port=8086' -- -i --forward-mode=softnic --portmask=0x2"
         # get dts output path
         if self.logger.log_path.startswith(os.sep):
             self.output_path = self.logger.log_path
@@ -106,7 +107,7 @@  class TestSoftnic(TestCase):
         # 10G nic pps(M)
         expect_pps = [14, 8, 4, 2, 1, 0.9, 0.8]
 
-        self.dut.send_expect(self.cmd % (self.target, 'firmware.cli'), "testpmd>", timeout=300)
+        self.dut.send_expect(self.cmd % (self.path, 'firmware.cli'), "testpmd>", timeout=300)
         self.dut.send_expect("set fwd macswap", "testpmd>")
         self.dut.send_expect("start", "testpmd>")
         rx_port = self.tester.get_local_port(0)
@@ -132,7 +133,7 @@  class TestSoftnic(TestCase):
 
     def test_perf_shaping_for_pipe(self):
         self.change_config_file('tm_firmware.cli')
-        self.dut.send_expect(self.cmd % (self.target, 'tm_firmware.cli'), "testpmd> ", timeout=800)
+        self.dut.send_expect(self.cmd % (self.path, 'tm_firmware.cli'), "testpmd> ", timeout=800)
         self.dut.send_expect("set fwd macswap", "testpmd>")
         self.dut.send_expect("start", "testpmd>")
         rx_port = self.tester.get_local_port(0)
@@ -169,7 +170,7 @@  class TestSoftnic(TestCase):
         for t in pkt_type:
             for i in range(2):
                 self.dut.send_expect("sed -i -e '12c table action profile AP0 ipv4 offset 270 fwd nat %s proto %s' %s" % (pkt_location[i], t, self.root_path + 'nat_firmware.cli'), "#")
-                self.dut.send_expect(self.cmd % (self.target, 'nat_firmware.cli'), "testpmd>", timeout=60)
+                self.dut.send_expect(self.cmd % (self.path, 'nat_firmware.cli'), "testpmd>", timeout=60)
                 self.dut.send_expect("start", "testpmd>")
                 # src ip tcp
                 for j in range(2):