test suite reviews and discussions
 help / color / mirror / Atom feed
From: Xie wei <weix.xie@intel.com>
To: dts@dpdk.org
Cc: Xie wei <weix.xie@intel.com>
Subject: [dts] [dts 6/8] tests/TestSuite_vf_interrupt_pmd:support meson build method
Date: Wed,  2 Sep 2020 17:15:08 +0800	[thread overview]
Message-ID: <20200902091510.6043-7-weix.xie@intel.com> (raw)
In-Reply-To: <20200902091510.6043-1-weix.xie@intel.com>

Signed-off-by: Xie wei <weix.xie@intel.com>
---
 tests/TestSuite_vf_interrupt_pmd.py | 22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

diff --git a/tests/TestSuite_vf_interrupt_pmd.py b/tests/TestSuite_vf_interrupt_pmd.py
index 55a8e3d..ac30950 100644
--- a/tests/TestSuite_vf_interrupt_pmd.py
+++ b/tests/TestSuite_vf_interrupt_pmd.py
@@ -65,8 +65,6 @@ class TestVfInterruptPmd(TestCase):
         self.port_mask = utils.create_mask(ports)
         self.core_mask_user = utils.create_mask(self.core_list[0:1])
 
-        self.path = "./examples/l3fwd-power/build/l3fwd-power"
-
         testport_0 = self.tester.get_local_port(self.dut_ports[0])
         self.rx_intf_0 = self.tester.get_interface(testport_0)
         self.tester_mac = self.tester.get_mac(testport_0)
@@ -94,6 +92,8 @@ class TestVfInterruptPmd(TestCase):
                 "sed -i -e '/DEV_RX_OFFLOAD_CHECKSUM,/d' \
                 ./examples/l3fwd-power/main.c", "#", 10)
         out = use_dut.send_expect("make -C examples/l3fwd-power", "#")
+        out = use_dut.build_dpdk_apps("./examples/l3fwd-power")
+        self.path = use_dut.apps_name['l3fwd-power']
         self.verify("Error" not in out, "compilation error")
 
     def send_packet(self, mac, testinterface, use_dut):
@@ -127,9 +127,7 @@ class TestVfInterruptPmd(TestCase):
         """
         begin l3fwd-power
         """
-        cmd_vhost_net = "./examples/l3fwd-power/build/l3fwd-power -n %d -c %s" % (
-                use_dut.get_memory_channels(), self.core_mask_user) + \
-                        " -- -P -p 1 --config='(0,0,%s)'" % self.core_user
+        cmd_vhost_net = self.path + "-n %d -c %s" % (use_dut.get_memory_channels(), self.core_mask_user) + " -- -P -p 1 --config='(0,0,%s)'" % self.core_user
         try:
             self.logger.info("Launch l3fwd_sample sample:")
             self.out = use_dut.send_expect(cmd_vhost_net, "L3FWD_POWER", 60)
@@ -149,8 +147,7 @@ class TestVfInterruptPmd(TestCase):
             if config_info != "":
                 config_info += ','
             config_info += '(0,%d,%d)' % (queue, queue)
-        cmd_vhost_net = "./examples/l3fwd-power/build/l3fwd-power -l 0-%d -n 4 -- -P -p 0x1" % \
-                        queue + " --config='%s'" % config_info
+        cmd_vhost_net = self.path + "-l 0-%d -n 4 -- -P -p 0x1" % queue + " --config='%s'" % config_info
         try:
             self.logger.info("Launch l3fwd_sample sample:")
             self.out = use_dut.send_expect(cmd_vhost_net, "L3FWD_POWER", 60)
@@ -239,10 +236,7 @@ class TestVfInterruptPmd(TestCase):
         core_user = core_list[0]
         core_mask_user = utils.create_mask(core_list)
 
-        cmd = self.path + \
-              " -c %s -n %d -- -P  -p 0x01 --config='(0,0,%s)'" % (
-                  core_mask_user, self.vm0_dut.get_memory_channels(), core_user)
-
+        cmd = self.path + "-c %s -n %d -- -P  -p 0x01 --config='(0,0,%s)'" % (core_mask_user, self.vm0_dut.get_memory_channels(), core_user)
         self.vm0_dut.send_expect(cmd, "L3FWD_POWER", 60)
         self.send_packet(self.vf0_mac, self.rx_intf_0, self.vm0_dut)
         self.destroy_vm_env()
@@ -365,9 +359,7 @@ class TestVfInterruptPmd(TestCase):
             if config_info != "":
                 config_info += ','
             config_info += '(0,%d,%d)' % (queue, queue)
-        cmd = "./examples/l3fwd-power/build/l3fwd-power -c %s -n 4 -- -P -p 0x1" \
-              % core_mask_user + \
-        " --config='%s'" % config_info
+        cmd = self.path + "-c %s -n 4 -- -P -p 0x1" % core_mask_user + " --config='%s'" % config_info
         self.vm0_dut.send_expect(cmd, "L3FWD_POWER", 60)
         time.sleep(1)
         try:
@@ -397,7 +389,7 @@ class TestVfInterruptPmd(TestCase):
         """
         Run after each test case.
         """
-        self.dut.send_expect("killall l3fwd-power", "# ", 10, alt_session=True)
+        self.dut.send_expect("killall %s" % self.path.strip().split('/')[-1], "# ", 10, alt_session=True)
 
     def tear_down_all(self):
         """
-- 
2.17.1


  parent reply	other threads:[~2020-09-02  9:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02  9:15 [dts] [PATCH V1 0/8] support " Xie wei
2020-09-02  9:15 ` [dts] [dts 1/8] tests/TestSuite_flow_filtering:support " Xie wei
2020-09-02  9:15 ` [dts] [dts 2/8] tests/TestSuite_port_control:support " Xie wei
2020-09-02  9:15 ` [dts] [dts 3/8] tests/TestSuite_runtime_vf_queue_number:support " Xie wei
2020-09-02  9:15 ` [dts] [dts 4/8] tests/TestSuite_runtime_vf_queue_number_kernel:support " Xie wei
2020-09-02  9:15 ` [dts] [dts 5/8] tests/TestSuite_veb_switch:support " Xie wei
2020-09-02  9:15 ` Xie wei [this message]
2020-09-02  9:15 ` [dts] [dts 7/8] tests/TestSuite_vm_power_manager:support " Xie wei
2020-09-02  9:15 ` [dts] [dts 8/8] tests/TestSuite_floating_veb:support " Xie wei
2020-09-02  9:30 ` [dts] [PATCH V1 0/8] support " Xie, WeiX
2020-09-04  6:07 ` Ma, LihongX
2020-09-09  8:27 ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200902091510.6043-7-weix.xie@intel.com \
    --to=weix.xie@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).