laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38543?usp=email )
Change subject: pySim-shell_test/utils: delete log files in general
......................................................................
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
---
M tests/pySim-shell_test/utils.py
1 file changed, 1 insertion(+), 2 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
diff --git a/tests/pySim-shell_test/utils.py b/tests/pySim-shell_test/utils.py
index fe8386a..943eb48 100644
--- a/tests/pySim-shell_test/utils.py
+++ b/tests/pySim-shell_test/utils.py
@@ -220,7 +220,7 @@
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 @@
"""
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):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38543?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I09dc7e59d1a3dcb68f54e3a8dccb86a1bc6c9ee6
Gerrit-Change-Number: 38543
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38545?usp=email )
Change subject: pySim-shell_test/utils: display pySim-shell logfile content
......................................................................
pySim-shell_test/utils: display pySim-shell logfile content
When we configure the tests to display file content, we only display files that
we compare, let's also display log file contents from pySim-shell. This will
be useful in situations where we only have log output from the tests, but no
access to the file system of the test host.
Related: OS#6601
Change-Id: Ibf6f78d7e71c213c7ca1caaf21c4c890e892261e
---
M tests/pySim-shell_test/utils.py
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/tests/pySim-shell_test/utils.py b/tests/pySim-shell_test/utils.py
index 6acbd70..348c9b1 100644
--- a/tests/pySim-shell_test/utils.py
+++ b/tests/pySim-shell_test/utils.py
@@ -272,6 +272,11 @@
# Check for exceptions
logfile = open(logfile_name)
logfile_content = logfile.read()
+ if self.print_content:
+ print("pySim-shell logfile content: (%s)" % os.path.basename(logfile_name))
+ print("-----------------------8<-----------------------")
+ print(logfile_content)
+ print("-----------------------8<-----------------------")
logfile.close()
exception_regex_compiled = re.compile('.*EXCEPTION.*')
exceptions_strings = re.findall(exception_regex_compiled, logfile_content)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38545?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ibf6f78d7e71c213c7ca1caaf21c4c890e892261e
Gerrit-Change-Number: 38545
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38544?usp=email )
Change subject: pySim-shell_test/utils: enumerate pySim-shell logs
......................................................................
pySim-shell_test/utils: enumerate pySim-shell logs
When pySim-shell is called by a testcase, a logfile is createted. The logfile
filename contains the testcase name. However, a testcase may run pySim-shell
multiple times. In this case we overwrite the log from previous run. Let's use a
counter to generate unique file names for each run, so that we won't lose logs
from previous runs.
Related: OS#6601
Change-Id: Ib2195d9b2231f74d0a6c4fb28f4889b6c45efb1e
---
M tests/pySim-shell_test/utils.py
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/tests/pySim-shell_test/utils.py b/tests/pySim-shell_test/utils.py
index 943eb48..6acbd70 100644
--- a/tests/pySim-shell_test/utils.py
+++ b/tests/pySim-shell_test/utils.py
@@ -170,6 +170,7 @@
testcasepath = inspect.getfile(self.__class__)
testcasename = testcasepath.split("/")[-2] + "." + self._testMethodName
print(boxed_heading_str("testcase: " + testcasename))
+ self.pysim_shell_log_counter = 0
# Find directories
self.test_dir = os.path.dirname(testcasepath)
@@ -240,7 +241,8 @@
no_exceptions : fail the testcase in case any exceptions occurred while running pySim_shell
"""
- logfile_name = "pySim-shell_" + self._testMethodName + ".log"
+ logfile_name = "pySim-shell_" + self._testMethodName + "_" + str(self.pysim_shell_log_counter) + ".log"
+ self.pysim_shell_log_counter+=1
# Make sure the script file is available
if not os.access(script, os.R_OK):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38544?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ib2195d9b2231f74d0a6c4fb28f4889b6c45efb1e
Gerrit-Change-Number: 38544
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38543?usp=email )
Change subject: pySim-shell_test/utils: delete log files in general
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38543?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I09dc7e59d1a3dcb68f54e3a8dccb86a1bc6c9ee6
Gerrit-Change-Number: 38543
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 25 Oct 2024 23:41:10 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/38550?usp=email )
Change subject: sua, sccp: Add APIs to get cause string description
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38550?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I2c38b2d8104e728dda234c36ea284266b4c55ab1
Gerrit-Change-Number: 38550
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 25 Oct 2024 23:40:52 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes