From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C293A04A2; Tue, 12 May 2020 08:06:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DEE531C118; Tue, 12 May 2020 08:06:30 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 875E51C0B6 for ; Tue, 12 May 2020 08:06:29 +0200 (CEST) IronPort-SDR: LSbJLNR25oUulJuhMJmTTzhU0xk+Pe6YxtbUyrH6ZA+6/73oHybIHrUvQZ3ywWUx8h6ok05pOq k7ALmXK7zZiQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2020 23:06:28 -0700 IronPort-SDR: 0Pua2We8tHrdzuaFyWdtVs2PpFsamSmz3oDNakMu6+80l23ngH+TxppjAf/1gLx0laxu2Q1wum Jj/F1mfY9ynw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,382,1583222400"; d="scan'208";a="280012590" Received: from unknown (HELO xqm-virtio_tester.sh.intel.com) ([10.240.183.52]) by orsmga002.jf.intel.com with ESMTP; 11 May 2020 23:06:26 -0700 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Tue, 12 May 2020 13:58:18 +0800 Message-Id: <1589263099-220942-1-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V1]unit_tests_loopback: update compile cmd of app/test X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" *. update compile cmd of app/test according to dpdk's update Signed-off-by: Xiao Qimai --- 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