test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/meson_tests: optimize script
@ 2023-01-12  9:10 Song Jiale
  2023-01-12  1:16 ` lijuan.tu
  0 siblings, 1 reply; 2+ messages in thread
From: Song Jiale @ 2023-01-12  9:10 UTC (permalink / raw)
  To: dts; +Cc: Song Jiale

the "~/tmp" directory is not the inherent directory structure of the Linux system.
change it to "/tmp".

Signed-off-by: Song Jiale <songx.jiale@intel.com>
---
 tests/TestSuite_meson_tests.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/tests/TestSuite_meson_tests.py b/tests/TestSuite_meson_tests.py
index 42fd37af..738affa7 100644
--- a/tests/TestSuite_meson_tests.py
+++ b/tests/TestSuite_meson_tests.py
@@ -108,8 +108,7 @@ class TestMesonTests(TestCase):
     def copy_file_from_dut(self):
         if os.path.exists(os.path.join(self.base_output, self.dut_pathlog)):
             os.remove(os.path.join(self.base_output, self.dut_pathlog))
-
-        src_pathlog = f"~/tmp/{self.dut_pathlog}"
+        src_pathlog = f"/tmp/{self.dut_pathlog}"
         self.dut.session.copy_file_from(src_pathlog, self.base_output)
 
     def insmod_kni(self):
@@ -141,7 +140,7 @@ class TestMesonTests(TestCase):
         self.delete_exists_files()
         self.insmod_kni()
         # config test case list in conf/meson_tests.cfg
-        cmds = f"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:fast-tests {param} |tee ~/tmp/{self.dut_pathlog}"
+        cmds = f"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:fast-tests {param} |tee /tmp/{self.dut_pathlog}"
         out = self.dut.send_expect(cmds, "# ", self.execute_wait_time)
         self.logger.info(out)
         self.copy_file_from_dut()
@@ -152,7 +151,7 @@ class TestMesonTests(TestCase):
         # init file name
         self.dut_pathlog = "driver-test.log"
         self.delete_exists_files()
-        cmds = f"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:driver-tests {param} |tee ~/tmp/{self.dut_pathlog}"
+        cmds = f"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:driver-tests {param} |tee /tmp/{self.dut_pathlog}"
         out = self.dut.send_expect(cmds, "# ", self.execute_wait_time)
         self.logger.info(out)
         self.copy_file_from_dut()
@@ -163,7 +162,7 @@ class TestMesonTests(TestCase):
         self.dut_pathlog = "test-debug.log"
         # delete exists files
         self.delete_exists_files()
-        cmds = f"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:debug-tests {param} |tee ~/tmp/{self.dut_pathlog}"
+        cmds = f"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:debug-tests {param} |tee /tmp/{self.dut_pathlog}"
         out = self.dut.send_expect(cmds, "# ", self.execute_wait_time)
         self.logger.info(out)
         self.copy_file_from_dut()
@@ -174,7 +173,7 @@ class TestMesonTests(TestCase):
         self.dut_pathlog = "extra-test.log"
         # delete exists files
         self.delete_exists_files()
-        cmds = f"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:extra-tests {param} |tee ~/tmp/{self.dut_pathlog}"
+        cmds = f"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:extra-tests {param} |tee /tmp/{self.dut_pathlog}"
         out = self.dut.send_expect(cmds, "# ", self.execute_wait_time)
         self.logger.info(out)
         self.copy_file_from_dut()
@@ -189,7 +188,7 @@ class TestMesonTests(TestCase):
         self.dut_pathlog = "perf-test.log"
         # delete exists files
         self.delete_exists_files()
-        cmds = f"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:perf-tests {param} |tee ~/tmp/{self.dut_pathlog}"
+        cmds = f"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:perf-tests {param} |tee /tmp/{self.dut_pathlog}"
         out = self.dut.send_expect(cmds, "# ", self.execute_wait_time)
         self.logger.info(out)
         self.copy_file_from_dut()
-- 
2.25.1


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

end of thread, other threads:[~2023-01-12  1:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12  9:10 [dts] [PATCH V1] tests/meson_tests: optimize script Song Jiale
2023-01-12  1:16 ` lijuan.tu

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