test suite reviews and discussions
 help / color / mirror / Atom feed
From: Ling Wei <weix.ling@intel.com>
To: dts@dpdk.org
Cc: Ling Wei <weix.ling@intel.com>
Subject: [dts] [PATCH V1] tests/unit_tests_loopback:rm exists file before cp
Date: Fri, 18 Dec 2020 11:36:32 +0000	[thread overview]
Message-ID: <20201218113632.367094-1-weix.ling@intel.com> (raw)

rm exists file before cp

Signed-off-by: Ling Wei <weix.ling@intel.com>
---
 tests/TestSuite_unit_tests_loopback.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_unit_tests_loopback.py b/tests/TestSuite_unit_tests_loopback.py
index 6babc2a1..0198a913 100644
--- a/tests/TestSuite_unit_tests_loopback.py
+++ b/tests/TestSuite_unit_tests_loopback.py
@@ -71,6 +71,7 @@ class TestUnitTestsLoopback(TestCase):
         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("rm -fr %s" % self.tmp_path, "# ")
         self.dut.send_expect("cp app/test/test_pmd_perf.c %s" % self.tmp_path, "# ")
 
     def set_up(self):
@@ -133,6 +134,7 @@ class TestUnitTestsLoopback(TestCase):
         """
         Run after each test case.
         """
+        self.dut.send_expect("rm -fr app/test/test_pmd_perf.c", "# ")
         self.dut.send_expect("cp %s app/test/test_pmd_perf.c" % self.tmp_path, "# ")
         self.dut.kill_all()
 
@@ -140,7 +142,6 @@ class TestUnitTestsLoopback(TestCase):
         """
         Run after each test suite.
         """
-        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)
         self.dut.build_install_dpdk(self.target)        
         self.dut.kill_all()
-- 
2.25.1


             reply	other threads:[~2020-12-18  3:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 11:36 Ling Wei [this message]
2020-12-18  3:42 ` Ling, WeiX
2020-12-18  5:15   ` Zhao, HaiyangX
2020-12-21  7:55 ` 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=20201218113632.367094-1-weix.ling@intel.com \
    --to=weix.ling@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).