mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
LogCollecteNB() not used anymore
Since 28ce0dc444 ("Main: pass in ctx"), the CI always collects logs
into cmake_targets/log/. Hence, LogCollecteNB() is never called. We can
remove it.
Further, change the cmake_targets/log/ to ci-log/, which is shorter, and
append a / on the zip path to make sure that only contents is zipped.
This commit is contained in:
@@ -437,7 +437,6 @@ elif re.match('^LogCollecteNB$', mode, re.IGNORECASE):
|
||||
logging.error("Command '{}' returned non-zero exit status {}.".format(e.cmd, e.returncode))
|
||||
logging.error("Error output:\n{}".format(e.output))
|
||||
sys.exit(0)
|
||||
RAN.LogCollecteNB()
|
||||
elif re.match('^LogCollectHSS$', mode, re.IGNORECASE):
|
||||
logging.warning("Option LogCollectHSS ignored")
|
||||
elif re.match('^LogCollectMME$', mode, re.IGNORECASE):
|
||||
|
||||
@@ -187,31 +187,6 @@ class RANManagement():
|
||||
|
||||
return logStatus >= 0
|
||||
|
||||
def LogCollecteNB(self):
|
||||
mySSH = SSH.SSHConnection()
|
||||
# Copying back to xNB server any log from all the runs.
|
||||
# Should also contains ping and iperf logs
|
||||
absPath = os.path.abspath('.')
|
||||
if absPath.count('ci-scripts') == 0:
|
||||
os.chdir('./ci-scripts')
|
||||
|
||||
for x in os.listdir():
|
||||
if x.endswith('.log') or x.endswith('.log.png'):
|
||||
mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, x, self.eNBSourceCodePath + '/cmake_targets/', silent=True, ignorePermDenied=True)
|
||||
# Back to normal
|
||||
mySSH.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword)
|
||||
mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5)
|
||||
mySSH.command('cd cmake_targets', '\$', 5)
|
||||
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S mv /tmp/enb_*.pcap .','\$',20)
|
||||
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S mv /tmp/gnb_*.pcap .','\$',20)
|
||||
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm -f enb.log.zip', '\$', 5)
|
||||
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip *.log enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log *monitor.pickle *monitor*.png ping*.log* iperf*.log log/*/*.log log/*/*.pcap', '\$', 60)
|
||||
result = re.search('core.\d+', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip core* ran_build/build/{lte,nr}-softmodem', '\$', 60) # add core and executable to zip
|
||||
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log *monitor.pickle *monitor*.png ping*.log* iperf*.log log/*/*.log log/*/*.pcap', '\$', 15)
|
||||
mySSH.close()
|
||||
|
||||
def _analyzeUeRetx(self, rounds, checkers, regex):
|
||||
if len(rounds) == 0 or len(checkers) == 0:
|
||||
logging.warning(f'warning: rounds={rounds} checkers={checkers}')
|
||||
|
||||
Reference in New Issue
Block a user