Commit d02a65c8 authored by Robert Schmidt's avatar Robert Schmidt

Tentatively analyze log files of RFsims

parent ac9ee8e2
...@@ -700,7 +700,7 @@ class Containerize(): ...@@ -700,7 +700,7 @@ class Containerize():
logging.debug(cmd) logging.debug(cmd)
networkNames = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10) 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 self.exitStatus = 0
ymlPath = self.yamlPath[0].split('/') ymlPath = self.yamlPath[0].split('/')
logPath = '../cmake_targets/log/' + ymlPath[1] logPath = '../cmake_targets/log/' + ymlPath[1]
...@@ -731,7 +731,24 @@ class Containerize(): ...@@ -731,7 +731,24 @@ class Containerize():
logging.debug(cmd) logging.debug(cmd)
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30) deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
if anyLogs: 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) logging.debug(cmd)
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10) deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
if self.tsharkStarted: if self.tsharkStarted:
......
...@@ -909,7 +909,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -909,7 +909,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
if CONTAINERS.exitStatus==1: if CONTAINERS.exitStatus==1:
RAN.prematureExit = True RAN.prematureExit = True
elif action == 'UndeployGenObject': elif action == 'UndeployGenObject':
CONTAINERS.UndeployGenObject(HTML) CONTAINERS.UndeployGenObject(HTML, RAN)
if CONTAINERS.exitStatus==1: if CONTAINERS.exitStatus==1:
RAN.prematureExit = True RAN.prematureExit = True
elif action == 'PingFromContainer': elif action == 'PingFromContainer':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment