test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1]unit_tests_loopback: update compile cmd of app/test
@ 2020-05-12  5:58 Xiao Qimai
  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
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Xiao Qimai @ 2020-05-12  5:58 UTC (permalink / raw)
  To: dts; +Cc: Xiao Qimai

*. 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-02  5:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12  5:58 [dts] [PATCH V1]unit_tests_loopback: update compile cmd of app/test Xiao Qimai
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

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).