[dts] [dts 22/38] tests/TestSuite_short_live.py: adapt to support both meson and makefile build

Zhou, Jun junx.w.zhou at intel.com
Tue Sep 8 09:18:09 CEST 2020


From: Zhou jun <junx.w.zhou at intel.com>

Signed-off-by: Zhou jun <junx.w.zhou at intel.com>
---
 tests/TestSuite_short_live.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_short_live.py b/tests/TestSuite_short_live.py
index 5a91420..60a3d2e 100644
--- a/tests/TestSuite_short_live.py
+++ b/tests/TestSuite_short_live.py
@@ -64,6 +64,9 @@ class TestShortLiveApp(TestCase):
         """
         self.ports = self.dut.get_ports(self.nic)
         self.verify(len(self.ports) >= 2, "Insufficient number of ports.")
+        self.app_l2fwd_path = self.dut.apps_name['l2fwd']
+        self.app_l3fwd_path = self.dut.apps_name['l3fwd']
+        self.app_testpmd = self.dut.apps_name['test-pmd']
 
     def set_up(self):
         """
@@ -138,7 +141,7 @@ class TestShortLiveApp(TestCase):
         Basic rx/tx forwarding test
         """
         #dpdk start
-        self.dut.send_expect("./%s/app/testpmd -c 0xf -n 4 -- -i --portmask=0x3" % self.target, "testpmd>", 120)
+        self.dut.send_expect("./%s -c 0xf -n 4 -- -i --portmask=0x3" % self.app_testpmd, "testpmd>", 120)
         time.sleep(5)
         self.dut.send_expect("set fwd mac", "testpmd>")
         self.dut.send_expect("set promisc all off", "testpmd>")
@@ -170,7 +173,7 @@ class TestShortLiveApp(TestCase):
         for i in range(repeat_time):
             #dpdk start
             print("clean_up_with_signal_testpmd round %d" % (i + 1))
-            self.dut.send_expect("./%s/app/testpmd -c 0xf -n 4 -- -i --portmask=0x3" % self.target, "testpmd>", 120)
+            self.dut.send_expect("./%s -c 0xf -n 4 -- -i --portmask=0x3" % self.app_testpmd, "testpmd>", 120)
             self.dut.send_expect("set fwd mac", "testpmd>")
             self.dut.send_expect("set promisc all off", "testpmd>")
             self.dut.send_expect("start", "testpmd>")
@@ -195,7 +198,7 @@ class TestShortLiveApp(TestCase):
         for i in range(repeat_time):
             #dpdk start
             print("clean_up_with_signal_l2fwd round %d" % (i + 1))
-            self.dut.send_expect("./examples/l2fwd/build/l2fwd -n 4 -c 0xf -- -p 0x3 &", "L2FWD: entering main loop", 60)
+            self.dut.send_expect("%s -n 4 -c 0xf -- -p 0x3 &" % self.app_l2fwd_path, "L2FWD: entering main loop", 60)
             self.check_forwarding([0, 1], self.nic)
 
             # kill with different Signal
@@ -211,7 +214,7 @@ class TestShortLiveApp(TestCase):
         for i in range(repeat_time):
             #dpdk start
             print("clean_up_with_signal_l3fwd round %d" % (i + 1))
-            self.dut.send_expect("./examples/l3fwd/build/l3fwd -n 4 -c 0xf -- -p 0x3 --config='(0,0,1),(1,0,2)' &", "L3FWD: entering main loop", 120)
+            self.dut.send_expect("%s -n 4 -c 0xf -- -p 0x3 --config='(0,0,1),(1,0,2)' &" % self.app_l3fwd_path, "L3FWD: entering main loop", 120)
             self.check_forwarding([0, 0], self.nic)
 
             # kill with different Signal
-- 
1.8.3.1



More information about the dts mailing list