From d8d52bdf77209eb392875d71b0713c233360d740 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Fri, 25 Oct 2024 10:34:37 +0200 Subject: [PATCH] pySim-shell_test/utils: delete log files in general When we get rid of temporary files, we delete those using a wildcard, but for the logs from pySim-shell we explicitly memorize the name of the pySim-shell logfile and delete it later by this explicit name. This is not necessary, let's just delete all log files present using a wildcard. Related: OS#6601 Change-Id: I09dc7e59d1a3dcb68f54e3a8dccb86a1bc6c9ee6 --- tests/pySim-shell_test/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/pySim-shell_test/utils.py b/tests/pySim-shell_test/utils.py index fe8386a6..943eb480 100644 --- a/tests/pySim-shell_test/utils.py +++ b/tests/pySim-shell_test/utils.py @@ -220,7 +220,7 @@ class UnittestUtils(unittest.TestCase): print("testcase execution done -- cleaning up ...") if not self.keepfiles: os.system("rm -f ./*.tmp") - os.system("rm -f ./" + self.__pySim_shell_logfile_name) + os.system("rm -f ./*.log") for template in self.__templates_generated: os.system("rm -f ./" + template) @@ -241,7 +241,6 @@ class UnittestUtils(unittest.TestCase): """ logfile_name = "pySim-shell_" + self._testMethodName + ".log" - self.__pySim_shell_logfile_name = logfile_name # Make sure the script file is available if not os.access(script, os.R_OK):