test suite reviews and discussions
 help / color / 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

* [dts] [PATCH V1 1/2]unit_tests_pmd_perf: change compile cmd of app/test according to dpdk's update
  2020-05-12  5:58 [dts] [PATCH V1]unit_tests_loopback: update compile cmd of app/test Xiao Qimai
@ 2020-05-12  5:58 ` 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
  2 siblings, 1 reply; 5+ messages in thread
From: Xiao Qimai @ 2020-05-12  5:58 UTC (permalink / raw)
  To: dts; +Cc: Xiao Qimai

*. replace compile command of app/test with new command

Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_unit_tests_pmd_perf.py | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/tests/TestSuite_unit_tests_pmd_perf.py b/tests/TestSuite_unit_tests_pmd_perf.py
index a01cf4e..3f4ed12 100644
--- a/tests/TestSuite_unit_tests_pmd_perf.py
+++ b/tests/TestSuite_unit_tests_pmd_perf.py
@@ -71,13 +71,17 @@ class TestUnitTestsPmdPerf(TestCase):
         [arch, machine, _, toolchain] = self.target.split('-')
         self.dut.send_expect("sed -i -e 's/CONFIG_RTE_IXGBE_INC_VECTOR=y/CONFIG_RTE_IXGBE_INC_VECTOR=n/' config/common_base", "# ", 30)
         self.dut.build_install_dpdk(self.target)
-        out = self.dut.build_dpdk_apps('./app/test/')
-        self.verify('make: Leaving directory' in out, "Compilation failed")
-        self.dut.send_expect("mv -f ./app/test/test ./app/test/test_scalar", "# ")
+        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.send_expect("mv -f ./%s/app/test ./app/test/test_scalar" % self.target, "# ")
+
         self.dut.send_expect("sed -i -e 's/CONFIG_RTE_IXGBE_INC_VECTOR=n/CONFIG_RTE_IXGBE_INC_VECTOR=y/' config/common_base", "# ", 30)
         self.dut.build_install_dpdk(self.target)
-        out = self.dut.build_dpdk_apps('./app/test/')
-        self.verify('make: Leaving directory' in out, "Compilation failed")
+        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.send_expect("mv -f ./%s/app/test ./app/test/test" % self.target, "# ")
         socket_id = self.dut.ports_info[0]['port'].socket
         self.cores = self.dut.get_core_list(config='1S/4C/1T', socket=socket_id)
 
-- 
1.8.3.1


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

* Re: [dts] [PATCH V1 1/2]unit_tests_pmd_perf: change compile cmd of app/test according to dpdk's update
  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
  0 siblings, 0 replies; 5+ messages in thread
From: Xiao, QimaiX @ 2020-05-12  6:09 UTC (permalink / raw)
  To: dts

[-- Attachment #1.1: Type: text/plain, Size: 2515 bytes --]

Tested-by^[$B!'^[(BXiao Qimai <qimaix.xiao@intel.com>
________________________________
From: Xiao, QimaiX <qimaix.xiao@intel.com>
Sent: Tuesday, May 12, 2020 1:58 PM
To: dts@dpdk.org <dts@dpdk.org>
Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
Subject: [dts][PATCH V1 1/2]unit_tests_pmd_perf: change compile cmd of app/test according to dpdk's update

*. replace compile command of app/test with new command

Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_unit_tests_pmd_perf.py | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/tests/TestSuite_unit_tests_pmd_perf.py b/tests/TestSuite_unit_tests_pmd_perf.py
index a01cf4e..3f4ed12 100644
--- a/tests/TestSuite_unit_tests_pmd_perf.py
+++ b/tests/TestSuite_unit_tests_pmd_perf.py
@@ -71,13 +71,17 @@ class TestUnitTestsPmdPerf(TestCase):
         [arch, machine, _, toolchain] = self.target.split('-')
         self.dut.send_expect("sed -i -e 's/CONFIG_RTE_IXGBE_INC_VECTOR=y/CONFIG_RTE_IXGBE_INC_VECTOR=n/' config/common_base", "# ", 30)
         self.dut.build_install_dpdk(self.target)
-        out = self.dut.build_dpdk_apps('./app/test/')
-        self.verify('make: Leaving directory' in out, "Compilation failed")
-        self.dut.send_expect("mv -f ./app/test/test ./app/test/test_scalar", "# ")
+        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.send_expect("mv -f ./%s/app/test ./app/test/test_scalar" % self.target, "# ")
+
         self.dut.send_expect("sed -i -e 's/CONFIG_RTE_IXGBE_INC_VECTOR=n/CONFIG_RTE_IXGBE_INC_VECTOR=y/' config/common_base", "# ", 30)
         self.dut.build_install_dpdk(self.target)
-        out = self.dut.build_dpdk_apps('./app/test/')
-        self.verify('make: Leaving directory' in out, "Compilation failed")
+        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.send_expect("mv -f ./%s/app/test ./app/test/test" % self.target, "# ")
         socket_id = self.dut.ports_info[0]['port'].socket
         self.cores = self.dut.get_core_list(config='1S/4C/1T', socket=socket_id)

--
1.8.3.1


[-- Attachment #1.2: Type: text/html, Size: 4876 bytes --]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="margin:0px; font-size:14.67px; font-family:Calibri,Arial,Helvetica,sans-serif; color:rgb(32,31,30); background-color:white">Tested-by:</span><span style="margin:0px; font-size:14.67px; font-family:Calibri,Arial,Helvetica,sans-serif; color:rgb(32,31,30); background-color:white">Xiao
 Qimai &lt;qimaix.xiao@intel.com&gt;</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
</div>
<div id="appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Xiao, QimaiX &lt;qimaix.xiao@intel.com&gt;<br>
<b>Sent:</b> Tuesday, May 12, 2020 1:58 PM<br>
<b>To:</b> dts@dpdk.org &lt;dts@dpdk.org&gt;<br>
<b>Cc:</b> Xiao, QimaiX &lt;qimaix.xiao@intel.com&gt;<br>
<b>Subject:</b> [dts][PATCH V1 1/2]unit_tests_pmd_perf: change compile cmd of app/test according to dpdk's update</font>
<div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">*. replace compile command of app/test with new command<br>
<br>
Signed-off-by: Xiao Qimai &lt;qimaix.xiao@intel.com&gt;<br>
---<br>
&nbsp;tests/TestSuite_unit_tests_pmd_perf.py | 14 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;-----<br>
&nbsp;1 file changed, 9 insertions(&#43;), 5 deletions(-)<br>
<br>
diff --git a/tests/TestSuite_unit_tests_pmd_perf.py b/tests/TestSuite_unit_tests_pmd_perf.py<br>
index a01cf4e..3f4ed12 100644<br>
--- a/tests/TestSuite_unit_tests_pmd_perf.py<br>
&#43;&#43;&#43; b/tests/TestSuite_unit_tests_pmd_perf.py<br>
@@ -71,13 +71,17 @@ class TestUnitTestsPmdPerf(TestCase):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [arch, machine, _, toolchain] = self.target.split('-')<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;sed -i -e 's/CONFIG_RTE_IXGBE_INC_VECTOR=y/CONFIG_RTE_IXGBE_INC_VECTOR=n/' config/common_base&quot;, &quot;# &quot;, 30)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.build_install_dpdk(self.target)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out = self.dut.build_dpdk_apps('./app/test/')<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify('make: Leaving directory' in out, &quot;Compilation failed&quot;)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;mv -f ./app/test/test ./app/test/test_scalar&quot;, &quot;# &quot;)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out = self.dut.send_expect(&quot;make -j %s app/test_sub O=%s&quot; % (self.dut.number_of_cores, self.target), &quot;#&quot;)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify(&quot;Error&quot; not in out, &quot;compilation l3fwd-power error&quot;)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify(&quot;No such&quot; not in out, &quot;Compilation error&quot;)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;mv -f ./%s/app/test ./app/test/test_scalar&quot; % self.target, &quot;# &quot;)<br>
&#43;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;sed -i -e 's/CONFIG_RTE_IXGBE_INC_VECTOR=n/CONFIG_RTE_IXGBE_INC_VECTOR=y/' config/common_base&quot;, &quot;# &quot;, 30)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.build_install_dpdk(self.target)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out = self.dut.build_dpdk_apps('./app/test/')<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify('make: Leaving directory' in out, &quot;Compilation failed&quot;)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out = self.dut.send_expect(&quot;make -j %s app/test_sub O=%s&quot; % (self.dut.number_of_cores, self.target), &quot;#&quot;)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify(&quot;Error&quot; not in out, &quot;compilation l3fwd-power error&quot;)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify(&quot;No such&quot; not in out, &quot;Compilation error&quot;)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;mv -f ./%s/app/test ./app/test/test&quot; % self.target, &quot;# &quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; socket_id = self.dut.ports_info[0]['port'].socket<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.cores = self.dut.get_core_list(config='1S/4C/1T', socket=socket_id)<br>
&nbsp;<br>
-- <br>
1.8.3.1<br>
<br>
</div>
</span></font></div>
</body>
</html>

[-- Attachment #2: TestUnitTestsPmdPerf.log --]
[-- Type: application/octet-stream, Size: 137245 bytes --]

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

* Re: [dts] [PATCH V1]unit_tests_loopback: update compile cmd of app/test
  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:11 ` Xiao, QimaiX
  2020-06-02  5:47 ` Tu, Lijuan
  2 siblings, 0 replies; 5+ messages in thread
From: Xiao, QimaiX @ 2020-05-12  6:11 UTC (permalink / raw)
  To: dts

[-- Attachment #1.1: Type: text/plain, Size: 5313 bytes --]

Tested-by^[$B!'^[(BXiao Qimai <qimaix.xiao@intel.com>

________________________________
From: Xiao, QimaiX <qimaix.xiao@intel.com>
Sent: Tuesday, May 12, 2020 1:58 PM
To: dts@dpdk.org <dts@dpdk.org>
Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
Subject: [dts][PATCH V1]unit_tests_loopback: update compile cmd of app/test

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


[-- Attachment #1.2: Type: text/html, Size: 10321 bytes --]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="margin: 0px; font-size: 14.67px; font-family: Calibri, Arial, Helvetica, sans-serif; color: rgb(32, 31, 30); background-color: white">Tested-by:</span><span style="margin: 0px; font-size: 14.67px; font-family: Calibri, Arial, Helvetica, sans-serif; color: rgb(32, 31, 30); background-color: white">Xiao
 Qimai &lt;qimaix.xiao@intel.com&gt;</span><br>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Xiao, QimaiX &lt;qimaix.xiao@intel.com&gt;<br>
<b>Sent:</b> Tuesday, May 12, 2020 1:58 PM<br>
<b>To:</b> dts@dpdk.org &lt;dts@dpdk.org&gt;<br>
<b>Cc:</b> Xiao, QimaiX &lt;qimaix.xiao@intel.com&gt;<br>
<b>Subject:</b> [dts][PATCH V1]unit_tests_loopback: update compile cmd of app/test</font>
<div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">*. update compile cmd of app/test according to dpdk's update<br>
<br>
Signed-off-by: Xiao Qimai &lt;qimaix.xiao@intel.com&gt;<br>
---<br>
&nbsp;tests/TestSuite_unit_tests_loopback.py | 24 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;-----------<br>
&nbsp;1 file changed, 13 insertions(&#43;), 11 deletions(-)<br>
<br>
diff --git a/tests/TestSuite_unit_tests_loopback.py b/tests/TestSuite_unit_tests_loopback.py<br>
index 68b1f30..c1d37b2 100644<br>
--- a/tests/TestSuite_unit_tests_loopback.py<br>
&#43;&#43;&#43; b/tests/TestSuite_unit_tests_loopback.py<br>
@@ -70,6 +70,8 @@ class TestUnitTestsLoopback(TestCase):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify(self.arch in [&quot;x86_64&quot;, &quot;arm64&quot;], &quot;pmd perf request running in x86_64 or arm64&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.max_traffic_burst = self.get_max_traffic_burst()<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;sed -i -e 's/#define MAX_TRAFFIC_BURST&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %s/#define MAX_TRAFFIC_BURST&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32/' app/test/test_pmd_perf.c&quot; % self.max_traffic_burst, &quot;# &quot;, 30)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.tmp_path = '/tmp/test_pmd_perf.c'<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;cp app/test/test_pmd_perf.c %s&quot; % self.tmp_path, &quot;# &quot;)<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; def set_up(self):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;<br>
@@ -90,14 +92,14 @@ class TestUnitTestsLoopback(TestCase):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Run pmd stream control mode burst test case.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;sed -i -e 's/lpbk_mode = 0/lpbk_mode = 1/' app/test/test_pmd_perf.c&quot;, &quot;# &quot;, 30)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out = self.dut.build_dpdk_apps('app/test')<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify(&quot;Error&quot; not in out, &quot;Compilation error&quot;)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out = self.dut.send_expect(&quot;make -j %s app/test_sub O=%s&quot; % (self.dut.number_of_cores, self.target), &quot;#&quot;)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify(&quot;Error&quot; not in out, &quot;compilation l3fwd-power error&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify(&quot;No such&quot; not in out, &quot;Compilation error&quot;)<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.tester.send_expect(&quot;rm -rf ./getPackageByTcpdump.cap&quot;, &quot;#&quot;)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.tester.send_expect(&quot;tcpdump -i %s -w ./getPackageByTcpdump.cap 2&gt; /dev/null&amp; &quot; % self.tester_itf, &quot;#&quot;)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.tester.send_expect(&quot;tcpdump -i %s ether[12:2] != '0x88cc' -w ./getPackageByTcpdump.cap 2&gt; /dev/null&amp; &quot; % self.tester_itf, &quot;#&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eal_params = self.dut.create_eal_parameters(cores=self.cores)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;./app/test/test %s&quot; % (eal_params), &quot;R.*T.*E.*&gt;.*&gt;&quot;, 60)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;./%s/app/test %s&quot; % (self.target, eal_params), &quot;R.*T.*E.*&gt;.*&gt;&quot;, 60)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out = self.dut.send_expect(&quot;pmd_perf_autotest&quot;, &quot;RTE&gt;&gt;&quot;, 120)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(out)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;quit&quot;, &quot;# &quot;)<br>
@@ -113,14 +115,14 @@ class TestUnitTestsLoopback(TestCase):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;sed -i -e 's/lpbk_mode = 1/lpbk_mode = 0/' app/test/test_pmd_perf.c&quot;, &quot;# &quot;, 30)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;sed -i -e '/check_all_ports_link_status(nb_ports, RTE_PORT_ALL);/a\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sleep(6);' app/test/test_pmd_perf.c&quot;, &quot;# &quot;, 30)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out = self.dut.build_dpdk_apps('app/test')<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify(&quot;Error&quot; not in out, &quot;Compilation error&quot;)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out = self.dut.send_expect(&quot;make -j %s app/test_sub O=%s&quot; % (self.dut.number_of_cores, self.target), &quot;#&quot;)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify(&quot;Error&quot; not in out, &quot;compilation l3fwd-power error&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify(&quot;No such&quot; not in out, &quot;Compilation error&quot;)<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.tester.send_expect(&quot;rm -rf ./getPackageByTcpdump.cap&quot;, &quot;#&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.tester.send_expect(&quot;tcpdump -i %s -w ./getPackageByTcpdump.cap 2&gt; /dev/null&amp; &quot; % self.tester_itf, &quot;#&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eal_params = self.dut.create_eal_parameters(cores=self.cores)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;./app/test/test %s&quot; % (eal_params), &quot;R.*T.*E.*&gt;.*&gt;&quot;, 60)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;./%s/app/test %s&quot; % (self.target, eal_params), &quot;R.*T.*E.*&gt;.*&gt;&quot;, 60)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_command(&quot;pmd_perf_autotest&quot;, 30)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # There is no packet loopback, so the test is hung.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # It needs to kill the process manually.<br>
@@ -133,16 +135,16 @@ class TestUnitTestsLoopback(TestCase):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Run after each test case.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;cp %s app/test/test_pmd_perf.c&quot; % self.tmp_path, &quot;# &quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.kill_all()<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; def tear_down_all(self):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Run after each test suite.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;sed -i -e 's/lpbk_mode = 0/lpbk_mode = 1/' app/test/test_pmd_perf.c&quot;, &quot;# &quot;, 30)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;sed -i -e '/sleep(6)/d' app/test/test_pmd_perf.c&quot;, &quot;# &quot;, 30)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;cp %s app/test/test_pmd_perf.c&quot; % self.tmp_path, &quot;# &quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.send_expect(&quot;sed -i -e 's/#define MAX_TRAFFIC_BURST&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32/#define MAX_TRAFFIC_BURST&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %s/' app/test/test_pmd_perf.c&quot; % self.max_traffic_burst, &quot;# &quot;, 30)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out = self.dut.build_dpdk_apps('app/test')<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify(&quot;Error&quot; not in out, &quot;Compilation error&quot;)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out = self.dut.send_expect(&quot;make -j %s app/test_sub O=%s&quot; % (self.dut.number_of_cores, self.target), &quot;#&quot;)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify(&quot;Error&quot; not in out, &quot;compilation l3fwd-power error&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.verify(&quot;No such&quot; not in out, &quot;Compilation error&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dut.kill_all()<br>
-- <br>
1.8.3.1<br>
<br>
</div>
</span></font></div>
</body>
</html>

[-- Attachment #2: TestUnitTestsLoopback.log --]
[-- Type: application/octet-stream, Size: 37138 bytes --]

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

* Re: [dts] [PATCH V1]unit_tests_loopback: update compile cmd of app/test
  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:11 ` [dts] [PATCH V1]unit_tests_loopback: update compile cmd of app/test Xiao, QimaiX
@ 2020-06-02  5:47 ` Tu, Lijuan
  2 siblings, 0 replies; 5+ messages in thread
From: Tu, Lijuan @ 2020-06-02  5:47 UTC (permalink / raw)
  To: Xiao, QimaiX, dts; +Cc: Xiao, QimaiX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai
> Sent: Tuesday, May 12, 2020 1:58 PM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts] [PATCH V1]unit_tests_loopback: update compile cmd of
> app/test
> 
> *. 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, back to index

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

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox