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

xizhan4x xix.zhang at intel.com
Fri Sep 4 10:18:42 CEST 2020


Signed-off-by: xizhan4x <xix.zhang at intel.com>
---
 tests/TestSuite_softnic.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

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):
-- 
1.8.3.1



More information about the dts mailing list