diff mbox series

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

Message ID 20200908071825.118583-23-junx.w.zhou@intel.com (mailing list archive)
State Accepted
Headers show
Series Modify suites to support meson | expand

Commit Message

Zhou, JunX W Sept. 8, 2020, 7:18 a.m. UTC
From: Zhou jun <junx.w.zhou@intel.com>

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

Patch

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