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

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

Commit Message

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

Signed-off-by: Zhou jun <junx.w.zhou@intel.com>
---
 tests/TestSuite_external_memory.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
  

Patch

diff --git a/tests/TestSuite_external_memory.py b/tests/TestSuite_external_memory.py
index 1623054..f899ae7 100644
--- a/tests/TestSuite_external_memory.py
+++ b/tests/TestSuite_external_memory.py
@@ -51,6 +51,7 @@  class TestExternalMemory(TestCase):
         self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
         cores = self.dut.get_core_list("1S/4C/1T")
         self.coremask = utils.create_mask(cores)
+        self.app_testpmd_path = self.dut.apps_name['test-pmd']
 
     def set_up(self):
         """
@@ -92,7 +93,8 @@  class TestExternalMemory(TestCase):
         Verifier IGB_UIO and anonymous memory allocation
         """
         self.insmod_modprobe(modename="igb_uio")
-        cmd = "./%s/app/testpmd -c %s -n 4 -- --mp-alloc=xmem -i"%(self.target,self.coremask)
+
+        cmd = "./%s -c %s -n 4 -- --mp-alloc=xmem -i" % (self.app_testpmd_path, self.coremask)
 
         self.dut.send_expect(cmd,"testpmd>",60)
         self.verifier_result()
@@ -102,8 +104,7 @@  class TestExternalMemory(TestCase):
         Verifier IGB_UIO and anonymous hugepage memory allocation
         """
         self.insmod_modprobe(modename="igb_uio")
-
-        cmd = "./%s/app/testpmd -c %s -n 4 -- --mp-alloc=xmemhuge -i"%(self.target,self.coremask)
+        cmd = "./%s -c %s -n 4 -- --mp-alloc=xmemhuge -i" % (self.app_testpmd_path, self.coremask)
 
         self.dut.send_expect(cmd,"testpmd>",60)
         self.verifier_result()
@@ -113,8 +114,7 @@  class TestExternalMemory(TestCase):
         Verifier VFIO_PCI and anonymous memory allocation
         """
         self.insmod_modprobe(modename="vfio-pci")
-
-        cmd = "./%s/app/testpmd -c %s -n 4 -- --mp-alloc=xmem -i"%(self.target,self.coremask)
+        cmd = "./%s -c %s -n 4 -- --mp-alloc=xmem -i" % (self.app_testpmd_path, self.coremask)
         self.dut.send_expect(cmd,"testpmd>",60)
 
         self.verifier_result()
@@ -124,7 +124,7 @@  class TestExternalMemory(TestCase):
         Verifier VFIO and anonymous hugepage memory allocation
         """
         self.insmod_modprobe(modename="vfio-pci")
-        cmd = "./%s/app/testpmd -c %s -n 4 -- --mp-alloc=xmemhuge -i"%(self.target,self.coremask)
+        cmd = "./%s -c %s -n 4 -- --mp-alloc=xmemhuge -i" % (self.app_testpmd_path, self.coremask)
         self.dut.send_expect(cmd,"testpmd>",60)
 
         self.verifier_result()