Commit b245b3b1 authored by hardy's avatar hardy

more logging, copy logs, create HTML row

parent 76c0335a
......@@ -53,6 +53,7 @@ amarisoft_ue_1:
Config : /root/NV17-12-21/ue/config/oaicicd-ue-Ping-SATest.cfg
Duration : 60
Ping : /tmp/test_ue1.log
UELog : /tmp/ue1.log
HostIPAddress : 192.168.18.89
HostUsername : root
HostPassword : toor
......@@ -60,6 +61,7 @@ amarisoft_ue_1:
#an other scenario example
#notice : this will not work as such, only suggestion for multi ue scenario
amarisoft_ue_2:
ID: amarisoft_ue_2
State : enabled
......@@ -71,7 +73,12 @@ amarisoft_ue_2:
Cmd : /root/NV17-12-21/ue/lteue
Config : /root/NV17-12-21/ue/config/xxxxxxx.cfg #to be updated for an other scenario
Duration : 60
Ping : /tmp/test_ue1.log #to be updated fo an other scenario
Ping :
- /tmp/test_ue1.log #to be updated fo an other scenario
- /tmp/test_ue2.log #could be a list for a multi ue scenario
UELog :
- /tmp/ue1.log
- /tmp/ue1.log
HostIPAddress : 192.168.18.89
HostUsername : root
HostPassword : toor
......
......@@ -67,8 +67,14 @@ class AS_UE:
def RunScenario(self):
mySSH = sshconnection.SSHConnection()
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
logging.debug("Deleting old artifacts :")
cmd='rm -rf ' + self.Ping + ' ' + self.UELog
mySSH.command(cmd,'#',5)
logging.debug("Running scenario :")
cmd='echo $USER; nohup '+self.Cmd + ' ' + self.Config + ' &'
mySSH.command(cmd,'#',5)
mySSH.close()
......
......@@ -469,6 +469,7 @@ class OaiCiTest():
#case it is a amarisoft ue (only 1 at a time supported at the moment)
elif ue_kind == 'amarisoft':
AS_UE = cls_amarisoft_ue.AS_UE(InfraUE.ci_ue_infra[self.ue_id])
HTML.CreateHtmlTestRow(AS_UE.Config, 'OK', CONST.ALL_PROCESSES_OK)
AS_UE.RunScenario()
AS_UE.WaitEndScenario()
AS_UE.KillASUE()
......@@ -1592,7 +1593,6 @@ class OaiCiTest():
#if module, ping from module to EPC
if self.ue_id!='':
if (re.match('amarisoft', self.ue_id, re.IGNORECASE)):
logging.debug("Ping analysis from amarisoft scenario")
launchFromEpc = False
launchFromASUE = True
else:
......@@ -1659,8 +1659,10 @@ class OaiCiTest():
elif (launchFromASUE == True):
#ping was already executed when running scenario
#we only need to retrieve ping log file, whose location is in the ci_ueinfra.yaml
logging.debug("Get Ping log from AS server : " + Module_UE.Ping)
logging.debug("Get logs from AS server : " + Module_UE.Ping + ", " + Module_UE.UELog)
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, Module_UE.Ping, '.')
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, Module_UE.UELog, '.')
logging.debug("Ping analysis from Amarisoft scenario")
path,ping_log_file = os.path.split(Module_UE.Ping)
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
SSH.command('cat ' + Module_UE.Ping, '\#', 5)
......
......@@ -37,7 +37,7 @@
<testCase id="010000">
<class>Initialize_UE</class>
<desc>Initialize Amarisoft UE 1x</desc>
<desc>Run AS UE Scenario</desc>
<id>amarisoft_ue_1</id>
</testCase>
......
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