diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 60e755e9cdeede777725b558b5671beada80ff3c..9248eba4b88818cfae45b8d17e11975fdd222275 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -700,7 +700,7 @@ class Containerize(): logging.debug(cmd) networkNames = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10) - def UndeployGenObject(self, HTML): + def UndeployGenObject(self, HTML, RAN): self.exitStatus = 0 ymlPath = self.yamlPath[0].split('/') logPath = '../cmake_targets/log/' + ymlPath[1] @@ -731,7 +731,24 @@ class Containerize(): logging.debug(cmd) deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30) if anyLogs: - cmd = 'mkdir -p '+ logPath + ' && mv ' + self.yamlPath[0] + '/*.log ' + logPath + cmd = 'mkdir -p '+ logPath + ' && cp ' + self.yamlPath[0] + '/*.log ' + logPath + logging.debug(cmd) + deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10) + + # Analyzing log file! + filename = self.yamlPath[0] + '/rfsim?g_oai_?nb.log' + logging.debug('\u001B[1m Analyzing xNB logfile \u001B[0m ' + filename) + cmd = 'ls ' + filename + logfileLs = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=5) + logging.debug(logfileLs) + # For the moment just assume this exists + logStatus = RAN.AnalyzeLogFile_eNB(filename, HTML) + if (logStatus < 0): + HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', logStatus) + else: + HTML.CreateHtmlTestRow(RAN.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK) + + cmd = 'rm ' + self.yamlPath[0] + '/*.log' logging.debug(cmd) deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10) if self.tsharkStarted: diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 3a5a69573d8b6e5e49212910817ff2e61847d842..5b5eec285ccaa8f608edd79734a8ba9d7d30f9be 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -909,7 +909,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re if CONTAINERS.exitStatus==1: RAN.prematureExit = True elif action == 'UndeployGenObject': - CONTAINERS.UndeployGenObject(HTML) + CONTAINERS.UndeployGenObject(HTML, RAN) if CONTAINERS.exitStatus==1: RAN.prematureExit = True elif action == 'PingFromContainer':