Commit d083463f authored by hardy's avatar hardy

Qlog archive mgt

parent 7deaece8
...@@ -37,7 +37,7 @@ import time ...@@ -37,7 +37,7 @@ import time
import re import re
import subprocess import subprocess
from datetime import datetime
class Module_UE: class Module_UE:
...@@ -149,3 +149,14 @@ class Module_UE: ...@@ -149,3 +149,14 @@ class Module_UE:
mySSH.close() mySSH.close()
def LogCollect(self):
mySSH = sshconnection.SSHConnection()
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
#archive qlog to /opt/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
mySSH.command('echo ' + self.HostPassword + ' | sudo -S cp -r '+source+' '+destination,'\$', 20)
mySSH.close()
return destination
...@@ -1086,7 +1086,8 @@ class OaiCiTest(): ...@@ -1086,7 +1086,8 @@ class OaiCiTest():
Module_UE.Command("detach") Module_UE.Command("detach")
Module_UE.DisableTrace() Module_UE.DisableTrace()
Module_UE.DisableCM() Module_UE.DisableCM()
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) archive_destination=Module_UE.LogCollect()
HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK)
...@@ -3155,7 +3156,8 @@ class OaiCiTest(): ...@@ -3155,7 +3156,8 @@ class OaiCiTest():
Module_UE.Command("detach") Module_UE.Command("detach")
Module_UE.DisableTrace() Module_UE.DisableTrace()
Module_UE.DisableCM() Module_UE.DisableCM()
archive_destination=Module_UE.LogCollect()
HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK)
if (self.ADBIPAddress != 'none'): if (self.ADBIPAddress != 'none'):
self.testCase_id = 'AUTO-KILL-UE' self.testCase_id = 'AUTO-KILL-UE'
HTML.testCase_id=self.testCase_id HTML.testCase_id=self.testCase_id
......
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