diff mbox series

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

Message ID 20200908071825.118583-9-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:17 a.m. UTC
From: Zhou jun <junx.w.zhou@intel.com>

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

Patch

diff --git a/tests/TestSuite_hello_world.py b/tests/TestSuite_hello_world.py
index 3d58e2a..cd843b5 100644
--- a/tests/TestSuite_hello_world.py
+++ b/tests/TestSuite_hello_world.py
@@ -46,6 +46,7 @@  class TestHelloWorld(TestCase):
             helloworld build pass
         """
         out = self.dut.build_dpdk_apps('examples/helloworld')
+        self.app_helloworld_path = self.dut.apps_name['helloworld']
 
         self.verify("Error" not in out, "compilation error 1")
         self.verify("No such file" not in out, "compilation error 2")
@@ -66,7 +67,7 @@  class TestHelloWorld(TestCase):
         # get the mask for the first core
         cores = self.dut.get_core_list('1S/1C/1T')
         coreMask = utils.create_mask(cores)
-        cmdline = "./examples/helloworld/build/helloworld -n 1 -c " + coreMask
+        cmdline = "./%s -n 1 -c " % self.app_helloworld_path + coreMask
         out = self.dut.send_expect(cmdline, "# ", 30)
         self.verify("hello from core %s" % cores[0] in out, "EAL not started on core%s" % cores[0])
 
@@ -87,7 +88,7 @@  class TestHelloWorld(TestCase):
 
         coreMask = utils.create_mask(cores[:available_max_lcore - 1])
 
-        cmdline = "./examples/helloworld/build/helloworld -n 1 -c " + coreMask
+        cmdline = "./%s -n 1 -c " % self.app_helloworld_path + coreMask
         out = self.dut.send_expect(cmdline, "# ", 50)
         for i in range(available_max_lcore - 1):
             self.verify("hello from core %s" % cores[i] in out, "EAL not started on core%s" % cores[i])