Commit ab3d6e73 authored by Robert Schmidt's avatar Robert Schmidt

Simplify physim1 log copy (while doing the same)

parent 8d9a36e0
...@@ -250,22 +250,11 @@ class PhySim: ...@@ -250,22 +250,11 @@ class PhySim:
logging.error('\u001B[1m Physical Simulator Fail\u001B[0m') logging.error('\u001B[1m Physical Simulator Fail\u001B[0m')
def AnalyzeLogFile_phySim(self): def AnalyzeLogFile_phySim(self):
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
mySSH = SSH.SSHConnection() mySSH = SSH.SSHConnection()
mySSH.open(lIpAddr, lUserName, lPassWord) mySSH.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword)
mySSH.command('cd ' + lSourcePath, '\$', 5) dirToCopy = f'{self.eNBSourceCodePath}/cmake_targets/log/'
mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5) mySSH.copyin(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, dirToCopy, f'./physim_test_logs_{self.testCase_id}/')
mySSH.command('mkdir -p physim_test_log_' + self.testCase_id, '\$', 5) mySSH.command(f'rm -rf {dirToCopy}', '\$', 5)
mySSH.command('cp log/physim_* ' + 'physim_test_log_' + self.testCase_id, '\$', 5)
mySSH.command('tar cvf physim_test_log_' + self.testCase_id + '/physim_log.tar log/*', '\$', 180)
mySSH.command('rm -rf log/*', '\$', 5)
if not os.path.exists(f'./physim_test_logs_{self.testCase_id}'):
os.mkdir(f'./physim_test_logs_{self.testCase_id}')
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/physim_test_log_' + self.testCase_id + '/*', './physim_test_logs_' + self.testCase_id)
mySSH.command('rm -rf ./physim_test_log_'+ self.testCase_id, '\$', 5)
mySSH.close() mySSH.close()
# physim test log analysis # physim test log analysis
nextt = 0 nextt = 0
......
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