diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 2fdbc0ec73..2ab36752db 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -311,7 +311,7 @@ class OaiCiTest(): for device_id in self.UEDevices: p = Process(target = self.InitializeUE_common, args = (device_id,i,COTS_UE,)) - def InitializeOAIUE(self,HTML,RAN,EPC): + def InitializeOAIUE(self,HTML,RAN,EPC,COTS_UE): if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') @@ -533,7 +533,7 @@ class OaiCiTest(): HTML.htmlUEFailureMsg='nr-uesoftmodem did NOT synced' HTML.CreateHtmlTestRow(self.air_interface + ' ' + self.Initialize_OAI_UE_args, 'KO', CONST.OAI_UE_PROCESS_COULD_NOT_SYNC, 'OAI UE') logging.error('\033[91mInitialize OAI UE Failed! \033[0m') - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) def checkDevTTYisUnlocked(self): SSH = sshconnection.SSHConnection() @@ -589,7 +589,7 @@ class OaiCiTest(): HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) self.checkDevTTYisUnlocked() - def TerminateCatM(self): + def TerminateCatM(self,HTML): if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') @@ -611,7 +611,7 @@ class OaiCiTest(): HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) self.checkDevTTYisUnlocked() - def AttachCatM(self): + def AttachCatM(self,HTML,RAN,COTS_UE): if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') @@ -684,9 +684,9 @@ class OaiCiTest(): html_cell = '
CAT-M module Attachment Failed' html_queue.put(html_cell) HTML.CreateHtmlTestRowQueue('N/A', 'KO', 1, html_queue) - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) - def PingCatM(self,HTML,RAN,EPC): + def PingCatM(self,HTML,RAN,EPC,COTS_UE): if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') @@ -695,7 +695,7 @@ class OaiCiTest(): pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC) if (pStatus < 0): HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) return try: statusQueue = SimpleQueue() @@ -716,7 +716,7 @@ class OaiCiTest(): moduleIPAddr = result.group('ipaddr') else: HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) return ping_time = re.findall("-c (\d+)",str(self.ping_args)) device_id = 'catm' @@ -780,7 +780,7 @@ class OaiCiTest(): HTML.CreateHtmlTestRowQueue(self.ping_args, 'OK', 1, statusQueue) else: HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', 1, statusQueue) - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) except: os.kill(os.getppid(),signal.SIGUSR1) @@ -881,7 +881,7 @@ class OaiCiTest(): pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC) if (pStatus < 0): HTML.CreateHtmlTestRow('N/A', 'KO', pStatus) - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) return multi_jobs = [] status_queue = SimpleQueue() @@ -900,7 +900,7 @@ class OaiCiTest(): if (status_queue.empty()): HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK) - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) return else: attach_status = True @@ -929,7 +929,7 @@ class OaiCiTest(): time.sleep(5) else: HTML.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue) - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) def DetachUE_common(self, device_id, idx,COTS_UE): try: @@ -962,7 +962,7 @@ class OaiCiTest(): pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC) if (pStatus < 0): HTML.CreateHtmlTestRow('N/A', 'KO', pStatus) - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) return multi_jobs = [] cnt = 0 @@ -1224,7 +1224,7 @@ class OaiCiTest(): except: os.kill(os.getppid(),signal.SIGUSR1) - def CheckStatusUE(self,HTML,RAN,EPC): + def CheckStatusUE(self,HTML,RAN,EPC,COTS_UE): if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') @@ -1271,7 +1271,7 @@ class OaiCiTest(): if (status_queue.empty()): HTML.CreateHtmlTestRow(htmlOptions, 'KO', CONST.ALL_PROCESSES_OK) - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) else: check_status = True html_queue = SimpleQueue() @@ -1287,7 +1287,7 @@ class OaiCiTest(): HTML.CreateHtmlTestRowQueue(htmlOptions, 'OK', len(self.UEDevices), html_queue) else: HTML.CreateHtmlTestRowQueue(htmlOptions, 'KO', len(self.UEDevices), html_queue) - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) def GetAllUEIPAddresses(self): SSH = sshconnection.SSHConnection() @@ -1451,14 +1451,14 @@ class OaiCiTest(): html_queue.put(html_cell) HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue) - def PingNoS1(self,HTML,RAN,EPC): + def PingNoS1(self,HTML,RAN,EPC,COTS_UE): SSH=sshconnection.SSHConnection() check_eNB = True check_OAI_UE = True pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC) if (pStatus < 0): HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) return ping_from_eNB = re.search('oaitun_enb1', str(self.ping_args)) if ping_from_eNB is not None: @@ -1544,10 +1544,10 @@ class OaiCiTest(): except: os.kill(os.getppid(),signal.SIGUSR1) - def Ping(self,HTML,RAN,EPC): + def Ping(self,HTML,RAN,EPC,COTS_UE): result = re.search('noS1', str(RAN.Initialize_eNB_args)) if result is not None: - self.PingNoS1(HTML,RAN,EPC) + self.PingNoS1(HTML,RAN,EPC,COTS_UE) return if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '': HELP.GenericHelp(CONST.Version) @@ -1560,12 +1560,12 @@ class OaiCiTest(): pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC) if (pStatus < 0): HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) return ueIpStatus = self.GetAllUEIPAddresses() if (ueIpStatus < 0): HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE) - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) return multi_jobs = [] i = 0 @@ -1583,7 +1583,7 @@ class OaiCiTest(): if (status_queue.empty()): HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.ALL_PROCESSES_OK) - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) else: ping_status = True html_queue = SimpleQueue() @@ -1600,7 +1600,7 @@ class OaiCiTest(): HTML.CreateHtmlTestRowQueue(self.ping_args, 'OK', len(self.UEDevices), html_queue) else: HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue) - self.AutoTerminateUEandeNB() + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE) def Iperf_ComputeTime(self): result = re.search('-t (?P