Commit 569dfb14 authored by hardy's avatar hardy

change storage location of zipped qlog

parent 8371109a
...@@ -134,7 +134,7 @@ class Module_UE: ...@@ -134,7 +134,7 @@ class Module_UE:
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
#delete old artifacts #delete old artifacts
mySSH.command('echo ' + self.HostPassword + ' | sudo -S rm -rf ci_qlog','\$',5) 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.command('echo $USER; nohup sudo -E QLog/QLog -s ci_qlog -f NR5G.cfg &','\$', 5)
mySSH.close() mySSH.close()
...@@ -155,16 +155,16 @@ class Module_UE: ...@@ -155,16 +155,16 @@ class Module_UE:
def LogCollect(self): def LogCollect(self):
mySSH = sshconnection.SSHConnection() mySSH = sshconnection.SSHConnection()
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) 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=datetime.now()
now_string = now.strftime("%Y%m%d-%H%M") now_string = now.strftime("%Y%m%d-%H%M")
source='ci_qlog' 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 #qlog artifact is zipped into the target folder
mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S zip -r '+destination+' '+source+' &','\$', 10) mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S zip -r '+destination+' '+source+' &','\$', 10)
mySSH.close() mySSH.close()
#post action : log cleaning to make sure enough space is reserved for the next run #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() Log_Mgt.LogRotation()
return destination return destination
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