test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/unit_tests_loopback:rm exists file before cp
@ 2020-12-18 11:36 Ling Wei
  2020-12-18  3:42 ` Ling, WeiX
  2020-12-21  7:55 ` Tu, Lijuan
  0 siblings, 2 replies; 4+ messages in thread
From: Ling Wei @ 2020-12-18 11:36 UTC (permalink / raw)
  To: dts; +Cc: Ling Wei

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


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

end of thread, other threads:[~2020-12-21  7:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-18 11:36 [dts] [PATCH V1] tests/unit_tests_loopback:rm exists file before cp Ling Wei
2020-12-18  3:42 ` Ling, WeiX
2020-12-18  5:15   ` Zhao, HaiyangX
2020-12-21  7:55 ` 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).