test suite reviews and discussions
 help / color / mirror / Atom feed
From: Xiao Qimai <qimaix.xiao@intel.com>
To: dts@dpdk.org
Cc: Xiao Qimai <qimaix.xiao@intel.com>
Subject: [dts] [PATCH V1]unit_tests_loopback: update compile cmd of app/test
Date: Tue, 12 May 2020 13:58:18 +0800	[thread overview]
Message-ID: <1589263099-220942-1-git-send-email-qimaix.xiao@intel.com> (raw)

*. update compile cmd of app/test according to dpdk's update

Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_unit_tests_loopback.py | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/tests/TestSuite_unit_tests_loopback.py b/tests/TestSuite_unit_tests_loopback.py
index 68b1f30..c1d37b2 100644
--- a/tests/TestSuite_unit_tests_loopback.py
+++ b/tests/TestSuite_unit_tests_loopback.py
@@ -70,6 +70,8 @@ class TestUnitTestsLoopback(TestCase):
         self.verify(self.arch in ["x86_64", "arm64"], "pmd perf request running in x86_64 or arm64")
         self.max_traffic_burst = self.get_max_traffic_burst()
         self.dut.send_expect("sed -i -e 's/#define MAX_TRAFFIC_BURST              %s/#define MAX_TRAFFIC_BURST              32/' app/test/test_pmd_perf.c" % self.max_traffic_burst, "# ", 30)
+        self.tmp_path = '/tmp/test_pmd_perf.c'
+        self.dut.send_expect("cp app/test/test_pmd_perf.c %s" % self.tmp_path, "# ")
 
     def set_up(self):
         """
@@ -90,14 +92,14 @@ class TestUnitTestsLoopback(TestCase):
         Run pmd stream control mode burst test case.
         """
         self.dut.send_expect("sed -i -e 's/lpbk_mode = 0/lpbk_mode = 1/' app/test/test_pmd_perf.c", "# ", 30)
-        out = self.dut.build_dpdk_apps('app/test')
-        self.verify("Error" not in out, "Compilation error")
+        out = self.dut.send_expect("make -j %s app/test_sub O=%s" % (self.dut.number_of_cores, self.target), "#")
+        self.verify("Error" not in out, "compilation l3fwd-power error")
         self.verify("No such" not in out, "Compilation error")
 
         self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
-        self.tester.send_expect("tcpdump -i %s -w ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#")
+        self.tester.send_expect("tcpdump -i %s ether[12:2] != '0x88cc' -w ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#")
         eal_params = self.dut.create_eal_parameters(cores=self.cores)
-        self.dut.send_expect("./app/test/test %s" % (eal_params), "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test %s" % (self.target, eal_params), "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("pmd_perf_autotest", "RTE>>", 120)
         print(out)
         self.dut.send_expect("quit", "# ")
@@ -113,14 +115,14 @@ class TestUnitTestsLoopback(TestCase):
         """
         self.dut.send_expect("sed -i -e 's/lpbk_mode = 1/lpbk_mode = 0/' app/test/test_pmd_perf.c", "# ", 30)
         self.dut.send_expect("sed -i -e '/check_all_ports_link_status(nb_ports, RTE_PORT_ALL);/a\        sleep(6);' app/test/test_pmd_perf.c", "# ", 30)
-        out = self.dut.build_dpdk_apps('app/test')
-        self.verify("Error" not in out, "Compilation error")
+        out = self.dut.send_expect("make -j %s app/test_sub O=%s" % (self.dut.number_of_cores, self.target), "#")
+        self.verify("Error" not in out, "compilation l3fwd-power error")
         self.verify("No such" not in out, "Compilation error")
 
         self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
         self.tester.send_expect("tcpdump -i %s -w ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#")
         eal_params = self.dut.create_eal_parameters(cores=self.cores)
-        self.dut.send_expect("./app/test/test %s" % (eal_params), "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test %s" % (self.target, eal_params), "R.*T.*E.*>.*>", 60)
         self.dut.send_command("pmd_perf_autotest", 30)
         # There is no packet loopback, so the test is hung.
         # It needs to kill the process manually.
@@ -133,16 +135,16 @@ class TestUnitTestsLoopback(TestCase):
         """
         Run after each test case.
         """
+        self.dut.send_expect("cp %s app/test/test_pmd_perf.c" % self.tmp_path, "# ")
         self.dut.kill_all()
 
     def tear_down_all(self):
         """
         Run after each test suite.
         """
-        self.dut.send_expect("sed -i -e 's/lpbk_mode = 0/lpbk_mode = 1/' app/test/test_pmd_perf.c", "# ", 30)
-        self.dut.send_expect("sed -i -e '/sleep(6)/d' app/test/test_pmd_perf.c", "# ", 30)
+        self.dut.send_expect("cp %s app/test/test_pmd_perf.c" % self.tmp_path, "# ")
         self.dut.send_expect("sed -i -e 's/#define MAX_TRAFFIC_BURST              32/#define MAX_TRAFFIC_BURST              %s/' app/test/test_pmd_perf.c" % self.max_traffic_burst, "# ", 30)
-        out = self.dut.build_dpdk_apps('app/test')
-        self.verify("Error" not in out, "Compilation error")
+        out = self.dut.send_expect("make -j %s app/test_sub O=%s" % (self.dut.number_of_cores, self.target), "#")
+        self.verify("Error" not in out, "compilation l3fwd-power error")
         self.verify("No such" not in out, "Compilation error")
         self.dut.kill_all()
-- 
1.8.3.1


             reply	other threads:[~2020-05-12  6:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12  5:58 Xiao Qimai [this message]
2020-05-12  5:58 ` [dts] [PATCH V1 1/2]unit_tests_pmd_perf: change compile cmd of app/test according to dpdk's update Xiao Qimai
2020-05-12  6:09   ` Xiao, QimaiX
2020-05-12  6:11 ` [dts] [PATCH V1]unit_tests_loopback: update compile cmd of app/test Xiao, QimaiX
2020-06-02  5:47 ` 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=1589263099-220942-1-git-send-email-qimaix.xiao@intel.com \
    --to=qimaix.xiao@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).