change storage location of zipped qlog
This commit is contained in:
@@ -134,7 +134,7 @@ class Module_UE:
|
||||
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
|
||||
#delete old artifacts
|
||||
mySSH.command('echo ' + self.HostPassword + ' | sudo -S rm -rf ci_qlog','\$',5)
|
||||
#start Trace
|
||||
#start Trace, artifact is created in home dir
|
||||
mySSH.command('echo $USER; nohup sudo -E QLog/QLog -s ci_qlog -f NR5G.cfg &','\$', 5)
|
||||
mySSH.close()
|
||||
|
||||
@@ -155,16 +155,16 @@ class Module_UE:
|
||||
def LogCollect(self):
|
||||
mySSH = sshconnection.SSHConnection()
|
||||
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
|
||||
#archive qlog to /opt/ci_qlogs with datetime suffix
|
||||
#archive qlog to USB stick in /media/usb-drive/ci_qlogs with datetime suffix
|
||||
now=datetime.now()
|
||||
now_string = now.strftime("%Y%m%d-%H%M")
|
||||
source='ci_qlog'
|
||||
destination='/opt/ci_qlogs/ci_qlog_'+now_string+'.zip'
|
||||
destination='/media/usb-drive/ci_qlogs/ci_qlog_'+now_string+'.zip'
|
||||
#qlog artifact is zipped into the target folder
|
||||
mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S zip -r '+destination+' '+source+' &','\$', 10)
|
||||
mySSH.close()
|
||||
#post action : log cleaning to make sure enough space is reserved for the next run
|
||||
Log_Mgt=cls_log_mgt.Log_Mgt(self.HostIPAddress, self.HostPassword, "/opt/ci_qlogs")
|
||||
Log_Mgt=cls_log_mgt.Log_Mgt(self.HostIPAddress, self.HostPassword, "/media/usb-drive/ci_qlogs")
|
||||
Log_Mgt.LogRotation()
|
||||
|
||||
return destination
|
||||
|
||||
Reference in New Issue
Block a user