mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
to switch to develop
This commit is contained in:
@@ -1,3 +1,33 @@
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
# Python for CI of OAI-eNB + COTS-UE
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
# Required Python Package
|
||||
# pexpect
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Import
|
||||
#-----------------------------------------------------------
|
||||
@@ -14,22 +44,28 @@ from multiprocessing import Process, Lock, SimpleQueue
|
||||
# OAI Testing modules
|
||||
#-----------------------------------------------------------
|
||||
import sshconnection as SSH
|
||||
#from sshconnection import SSHConnection as SSH
|
||||
import helpreadme as HELP
|
||||
import constants as CONST
|
||||
import html as HTML
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Class Declaration
|
||||
#-----------------------------------------------------------
|
||||
class EPCManagement():
|
||||
|
||||
def __init__(self):
|
||||
self.EPCIPAddress = ''
|
||||
self.EPCUserName = ''
|
||||
self.EPCPassword = ''
|
||||
self.EPCSourceCodePath = ''
|
||||
self.EPCType = ''
|
||||
|
||||
self.IPAddress = ''
|
||||
self.UserName = ''
|
||||
self.Password = ''
|
||||
self.SourceCodePath = ''
|
||||
self.Type = ''
|
||||
self.EPC_PcapFileName = ''
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Setter and Getters
|
||||
#-----------------------------------------------------------
|
||||
|
||||
def SetIPAddress(self, ipaddress):
|
||||
self.EPCIPAddress = ipaddress
|
||||
def GetIPAddress(self):
|
||||
@@ -55,6 +91,10 @@ class EPCManagement():
|
||||
def Get_PcapFileName(self):
|
||||
return self.EPC_PcapFileName
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# EPC management functions
|
||||
#-----------------------------------------------------------
|
||||
|
||||
def InitializeHSS(self):
|
||||
if self.EPCIPAddress == '' or self.EPCUserName == '' or self.EPCPassword == '' or self.EPCSourceCodePath == '' or self.EPCType == '':
|
||||
HELP.GenericHelp(Version)
|
||||
@@ -91,7 +131,7 @@ class EPCManagement():
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
#self.CreateHtmlTestRow(self.EPCType, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow(self.EPCType, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def InitializeMME(self):
|
||||
if self.EPCIPAddress == '' or self.EPCUserName == '' or self.EPCPassword == '' or self.EPCSourceCodePath == '' or self.EPCType == '':
|
||||
@@ -124,7 +164,7 @@ class EPCManagement():
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
#self.CreateHtmlTestRow(self.EPCType, 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow(self.EPCType, 'OK', ALL_PROCESSES_OK)
|
||||
|
||||
def InitializeSPGW(self):
|
||||
if self.EPCIPAddress == '' or self.EPCUserName == '' or self.EPCPassword == '' or self.EPCSourceCodePath == '' or self.EPCType == '':
|
||||
@@ -155,7 +195,7 @@ class EPCManagement():
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
#self.CreateHtmlTestRow(self.EPCType, 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow(self.EPCType, 'OK', ALL_PROCESSES_OK)
|
||||
|
||||
|
||||
def CheckHSSProcess(self, status_queue):
|
||||
@@ -255,7 +295,7 @@ class EPCManagement():
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
mySSH.close()
|
||||
#self.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def TerminateMME(self):
|
||||
mySSH = SSH.SSHConnection()
|
||||
@@ -274,7 +314,7 @@ class EPCManagement():
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
mySSH.close()
|
||||
#self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
|
||||
def TerminateSPGW(self):
|
||||
mySSH = SSH.SSHConnection()
|
||||
@@ -305,7 +345,7 @@ class EPCManagement():
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
mySSH.close()
|
||||
#self.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
|
||||
def LogCollectHSS(self):
|
||||
|
||||
@@ -1,3 +1,33 @@
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
# Python for CI of OAI-eNB + COTS-UE
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
# Required Python Package
|
||||
# pexpect
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Functions Declaration
|
||||
#-----------------------------------------------------------
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
# Python for CI of OAI-eNB + COTS-UE
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
# Required Python Package
|
||||
# pexpect
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Import
|
||||
@@ -10,117 +39,24 @@ import time
|
||||
import subprocess
|
||||
from multiprocessing import Process, Lock, SimpleQueue
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# OAI Testing modules
|
||||
#-----------------------------------------------------------
|
||||
#import main_enb
|
||||
#MAIN = main_enb.OaiCiTest()
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Class Declaration
|
||||
#-----------------------------------------------------------
|
||||
class HTMLManagement():
|
||||
|
||||
def __init__(self):
|
||||
# self.FailReportCnt = 0
|
||||
# self.prematureExit = False
|
||||
self.ranRepository = ''
|
||||
self.ranBranch = ''
|
||||
self.ranAllowMerge = False
|
||||
self.ranCommitID = ''
|
||||
self.ranTargetBranch = ''
|
||||
#self.eNBIPAddress = ''
|
||||
#self.eNBUserName = ''
|
||||
#self.eNBPassword = ''
|
||||
#self.eNBSourceCodePath = ''
|
||||
#self.eNB1IPAddress = ''
|
||||
#self.eNB1UserName = ''
|
||||
#self.eNB1Password = ''
|
||||
#self.eNB1SourceCodePath = ''
|
||||
#self.eNB2IPAddress = ''
|
||||
#self.eNB2UserName = ''
|
||||
#self.eNB2Password = ''
|
||||
#self.eNB2SourceCodePath = ''
|
||||
#self.ADBIPAddress = ''
|
||||
#self.ADBUserName = ''
|
||||
#self.ADBPassword = ''
|
||||
#self.ADBCentralized = True
|
||||
#self.testCase_id = ''
|
||||
self.testXMLfiles = []
|
||||
self.nbTestXMLfiles = 0
|
||||
#self.desc = ''
|
||||
#self.Build_eNB_args = ''
|
||||
#self.backgroundBuild = False
|
||||
#self.backgroundBuildTestId = ['', '', '']
|
||||
#self.Build_eNB_forced_workspace_cleanup = False
|
||||
#self.Initialize_eNB_args = ''
|
||||
#self.air_interface = 'lte'
|
||||
#self.eNB_instance = ''
|
||||
#self.eNB_serverId = ''
|
||||
#self.eNBLogFiles = ['', '', '']
|
||||
#self.eNBOptions = ['', '', '']
|
||||
#self.eNBmbmsEnables = [False, False, False]
|
||||
#self.eNBstatuses = [-1, -1, -1]
|
||||
#self.ping_args = ''
|
||||
#self.ping_packetloss_threshold = ''
|
||||
#self.iperf_args = ''
|
||||
#self.iperf_packetloss_threshold = ''
|
||||
#self.iperf_profile = ''
|
||||
#self.iperf_options = ''
|
||||
#self.nbMaxUEtoAttach = -1
|
||||
#self.UEDevices = []
|
||||
#self.UEDevicesStatus = []
|
||||
#self.UEDevicesRemoteServer = []
|
||||
#self.UEDevicesRemoteUser = []
|
||||
#self.UEDevicesOffCmd = []
|
||||
#self.UEDevicesOnCmd = []
|
||||
#self.UEDevicesRebootCmd = []
|
||||
#self.CatMDevices = []
|
||||
#self.UEIPAddresses = []
|
||||
self.htmlFile = ''
|
||||
self.htmlHeaderCreated = False
|
||||
self.htmlFooterCreated = False
|
||||
self.htmlUEConnected = -1
|
||||
self.htmlNb_Smartphones = 0
|
||||
self.htmlNb_CATM_Modules = 0
|
||||
self.htmleNBFailureMsg = ''
|
||||
self.htmlUEFailureMsg = ''
|
||||
#self.picocom_closure = False
|
||||
#self.idle_sleep_time = 0
|
||||
#self.x2_ho_options = 'network'
|
||||
#self.x2NbENBs = 0
|
||||
#self.x2ENBBsIds = []
|
||||
#self.x2ENBConnectedUEs = []
|
||||
|
||||
self.htmlTabRefs = []
|
||||
self.htmlTabNames = []
|
||||
self.htmlTabIcons = []
|
||||
#self.repeatCounts = []
|
||||
#self.finalStatus = False
|
||||
#self.OsVersion = ''
|
||||
#self.KernelVersion = ''
|
||||
#self.UhdVersion = ''
|
||||
#self.UsrpBoard = ''
|
||||
#self.CpuNb = ''
|
||||
#self.CpuModel = ''
|
||||
#self.CpuMHz = ''
|
||||
#self.UEIPAddress = ''
|
||||
#self.UEUserName = ''
|
||||
#self.UEPassword = ''
|
||||
#self.UE_instance = ''
|
||||
#self.UESourceCodePath = ''
|
||||
#self.UELogFile = ''
|
||||
#self.Build_OAI_UE_args = ''
|
||||
#self.Initialize_OAI_UE_args = ''
|
||||
#self.clean_repository = True
|
||||
#self.flexranCtrlInstalled = False
|
||||
#self.flexranCtrlStarted = False
|
||||
#self.expectedNbOfConnectedUEs = 0
|
||||
#self.startTime = 0
|
||||
|
||||
|
||||
self.testXMLfiles = []
|
||||
#-----------------------------------------------------------
|
||||
# HTML Reporting....
|
||||
# Setters and Getters
|
||||
#-----------------------------------------------------------
|
||||
def SetreseNB(self,rsenb):
|
||||
self.reseNB = rsenb
|
||||
def SetresUE(self,rsue):
|
||||
self.resUE = rsue
|
||||
|
||||
def Setdesc(self, dsc):
|
||||
self.desc = dsc
|
||||
@@ -157,11 +93,6 @@ class HTMLManagement():
|
||||
self.ranTargetBranch = tbranch
|
||||
def GetranTargetBranch(self):
|
||||
return self.ranTargetBranch
|
||||
|
||||
# def SetADBIPAddress(self, adbip):
|
||||
# self.ADBIPAddress = adbip
|
||||
# def GetADBIPAddress(self):
|
||||
# return self.ADBIPAddress
|
||||
|
||||
def SethtmlUEConnected(self, nbUEs):
|
||||
self.htmlUEConnected = nbUEs
|
||||
@@ -187,6 +118,12 @@ class HTMLManagement():
|
||||
def SethtmlTabIcons(self, tabIcon):
|
||||
self.htmlTabIcons.append(tabIcon)
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# HTML structure creation functions
|
||||
#-----------------------------------------------------------
|
||||
|
||||
|
||||
def CreateHtmlHeader(self, ADBIPAddress):
|
||||
if (not self.htmlHeaderCreated):
|
||||
logging.debug('\u001B[1m----------------------------------------\u001B[0m')
|
||||
@@ -270,15 +207,9 @@ class HTMLManagement():
|
||||
self.htmlFile.write(' </table>\n')
|
||||
|
||||
if (ADBIPAddress != 'none'):
|
||||
#terminate_ue_flag = True
|
||||
#MAIN.GetAllUEDevices(terminate_ue_flag)
|
||||
#self.GetAllCatMDevices(terminate_ue_flag)
|
||||
#self.htmlUEConnected = len(self.UEDevices)
|
||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> ' + str(self.htmlNb_Smartphones) + ' UE(s) is(are) connected to ADB bench server</h2>\n')
|
||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> ' + str(self.htmlNb_CATM_Modules) + ' CAT-M UE(s) is(are) connected to bench server</h2>\n')
|
||||
else:
|
||||
#self.UEDevices.append('OAI-UE')
|
||||
#self.htmlUEConnected = len(self.UEDevices)
|
||||
self.htmlUEConnected = 1
|
||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> 1 OAI UE(s) is(are) connected to CI bench</h2>\n')
|
||||
self.htmlFile.write(' <br>\n')
|
||||
@@ -316,14 +247,6 @@ class HTMLManagement():
|
||||
self.htmlFile.write(' <th>Test Desc</th>\n')
|
||||
self.htmlFile.write(' <th>Test Options</th>\n')
|
||||
self.htmlFile.write(' <th>Test Status</th>\n')
|
||||
#if (self.htmlUEConnected == -1):
|
||||
# terminate_ue_flag = True
|
||||
# if (self.ADBIPAddress != 'none'):
|
||||
# self.GetAllUEDevices(terminate_ue_flag)
|
||||
# self.GetAllCatMDevices(terminate_ue_flag)
|
||||
# else:
|
||||
# self.UEDevices.append('OAI-UE')
|
||||
# self.htmlUEConnected = len(self.UEDevices)
|
||||
|
||||
i = 0
|
||||
while (i < self.htmlUEConnected):
|
||||
@@ -366,14 +289,41 @@ class HTMLManagement():
|
||||
self.htmlFile.write(' <p></p>\n')
|
||||
self.htmlFile.write(' <table class="table table-condensed">\n')
|
||||
|
||||
machines = [ 'eNB', 'UE' ]
|
||||
for machine in machines:
|
||||
#This needs to move back to main and be called before CreateHtmlFooter
|
||||
res = self.RetrieveSystemVersion(machine)
|
||||
if res == -1:
|
||||
continue
|
||||
# GP machines = [ 'eNB', 'UE' ]
|
||||
# GP for machine in machines:
|
||||
#GP This needs to move back to main and be called before CreateHtmlFooter
|
||||
|
||||
res = self.reseNB
|
||||
if res != -1:
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <th colspan=8>' + str(machine) + ' Server Characteristics</th>\n')
|
||||
self.htmlFile.write(' <th colspan=8>' + str('eNB') + ' Server Characteristics</th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td>OS Version</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.OsVersion + '</span></td>\n')
|
||||
self.htmlFile.write(' <td>Kernel Version</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.KernelVersion + '</span></td>\n')
|
||||
self.htmlFile.write(' <td>UHD Version</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.UhdVersion + '</span></td>\n')
|
||||
self.htmlFile.write(' <td>USRP Board</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.UsrpBoard + '</span></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td>Nb CPUs</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.CpuNb + '</span></td>\n')
|
||||
self.htmlFile.write(' <td>CPU Model Name</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.CpuModel + '</span></td>\n')
|
||||
self.htmlFile.write(' <td>CPU Frequency</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.CpuMHz + '</span></td>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
|
||||
|
||||
res = self.resUE
|
||||
if res != -1:
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <th colspan=8>' + str('UE') + ' Server Characteristics</th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td>OS Version</td>\n')
|
||||
@@ -410,8 +360,6 @@ class HTMLManagement():
|
||||
self.htmlFile.write('</html>\n')
|
||||
self.htmlFile.close()
|
||||
|
||||
#FailReportCnt should be passed as a parameter of CreateHtmlRetrySeparator method
|
||||
# no need for a setter and be a member of html class
|
||||
def CreateHtmlRetrySeparator(self, cntnumfails):
|
||||
if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)):
|
||||
self.htmlFile = open('test_results.html', 'a')
|
||||
|
||||
@@ -35,43 +35,6 @@ import constants as CONST
|
||||
#-----------------------------------------------------------
|
||||
Version = '0.1'
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Constants
|
||||
#-----------------------------------------------------------
|
||||
ALL_PROCESSES_OK = CONST.ALL_PROCESSES_OK
|
||||
ENB_PROCESS_FAILED = CONST.ENB_PROCESS_FAILED
|
||||
ENB_PROCESS_OK = CONST.ENB_PROCESS_OK
|
||||
ENB_PROCESS_SEG_FAULT = CONST.ENB_PROCESS_SEG_FAULT
|
||||
ENB_PROCESS_ASSERTION = CONST.ENB_PROCESS_ASSERTION
|
||||
ENB_PROCESS_REALTIME_ISSUE = CONST.ENB_PROCESS_REALTIME_ISSUE
|
||||
ENB_PROCESS_NOLOGFILE_TO_ANALYZE = CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE
|
||||
ENB_PROCESS_SLAVE_RRU_NOT_SYNCED = CONST.ENB_PROCESS_SLAVE_RRU_NOT_SYNCED
|
||||
HSS_PROCESS_FAILED = CONST.HSS_PROCESS_FAILED
|
||||
HSS_PROCESS_OK = CONST.HSS_PROCESS_OK
|
||||
MME_PROCESS_FAILED = CONST.MME_PROCESS_FAILED
|
||||
MME_PROCESS_OK = CONST.MME_PROCESS_OK
|
||||
SPGW_PROCESS_FAILED = CONST.SPGW_PROCESS_FAILED
|
||||
SPGW_PROCESS_OK = CONST.SPGW_PROCESS_OK
|
||||
UE_IP_ADDRESS_ISSUE = CONST.UE_IP_ADDRESS_ISSUE
|
||||
OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE = CONST.OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE
|
||||
OAI_UE_PROCESS_COULD_NOT_SYNC = CONST.OAI_UE_PROCESS_COULD_NOT_SYNC
|
||||
OAI_UE_PROCESS_ASSERTION = CONST.OAI_UE_PROCESS_ASSERTION
|
||||
OAI_UE_PROCESS_FAILED = CONST.OAI_UE_PROCESS_FAILED
|
||||
OAI_UE_PROCESS_NO_TUNNEL_INTERFACE = CONST.OAI_UE_PROCESS_NO_TUNNEL_INTERFACE
|
||||
OAI_UE_PROCESS_SEG_FAULT = CONST.OAI_UE_PROCESS_SEG_FAULT
|
||||
OAI_UE_PROCESS_OK = CONST.OAI_UE_PROCESS_OK
|
||||
|
||||
UE_STATUS_DETACHED = CONST.UE_STATUS_DETACHED
|
||||
UE_STATUS_DETACHING = CONST.UE_STATUS_DETACHING
|
||||
UE_STATUS_ATTACHING = CONST.UE_STATUS_ATTACHING
|
||||
UE_STATUS_ATTACHED = CONST.UE_STATUS_ATTACHED
|
||||
|
||||
X2_HO_REQ_STATE__IDLE = CONST.X2_HO_REQ_STATE__IDLE
|
||||
X2_HO_REQ_STATE__TARGET_RECEIVES_REQ = CONST.X2_HO_REQ_STATE__TARGET_RECEIVES_REQ
|
||||
X2_HO_REQ_STATE__TARGET_RRC_RECFG_COMPLETE = CONST.X2_HO_REQ_STATE__TARGET_RRC_RECFG_COMPLETE
|
||||
X2_HO_REQ_STATE__TARGET_SENDS_SWITCH_REQ = CONST.X2_HO_REQ_STATE__TARGET_SENDS_SWITCH_REQ
|
||||
X2_HO_REQ_STATE__SOURCE_RECEIVES_REQ_ACK = CONST.X2_HO_REQ_STATE__SOURCE_RECEIVES_REQ_ACK
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Import
|
||||
#-----------------------------------------------------------
|
||||
@@ -91,36 +54,14 @@ logging.basicConfig(
|
||||
format="[%(asctime)s] %(name)s:%(levelname)s: %(message)s"
|
||||
)
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Class Declaration
|
||||
#-----------------------------------------------------------
|
||||
class OaiCiTest():
|
||||
|
||||
def __init__(self):
|
||||
self.FailReportCnt = 0
|
||||
self.prematureExit = False
|
||||
#self.ranRepository = ''
|
||||
#self.ranBranch = ''
|
||||
#RAN.GetranAllowMerge() = False
|
||||
#self.ranCommitID = ''
|
||||
#RAN.GetranTargetBranch() = ''
|
||||
#self.eNBIPAddress = ''
|
||||
#self.eNBUserName = ''
|
||||
#self.eNBPassword = ''
|
||||
#RAN.GeteNBSourceCodePath() = ''
|
||||
#self.EPCIPAddress = ''
|
||||
#self.EPCUserName = ''
|
||||
#self.EPCPassword = ''
|
||||
#self.eNB1IPAddress = ''
|
||||
#self.eNB1UserName = ''
|
||||
#self.eNB1Password = ''
|
||||
#self.eNB1SourceCodePath = ''
|
||||
#self.eNB2IPAddress = ''
|
||||
#self.eNB2UserName = ''
|
||||
#self.eNB2Password = ''
|
||||
#self.eNB2SourceCodePath = ''
|
||||
#self.EPCSourceCodePath = ''
|
||||
#self.EPCType = ''
|
||||
#self.EPC_PcapFileName = ''
|
||||
self.ADBIPAddress = ''
|
||||
self.ADBUserName = ''
|
||||
self.ADBPassword = ''
|
||||
@@ -129,18 +70,6 @@ class OaiCiTest():
|
||||
self.testXMLfiles = []
|
||||
self.nbTestXMLfiles = 0
|
||||
self.desc = ''
|
||||
#RAN.GetBuild_eNB_args() = ''
|
||||
#self.backgroundBuild = False
|
||||
#self.backgroundBuildTestId = ['', '', '']
|
||||
#self.Build_eNB_forced_workspace_cleanup = False
|
||||
#RAN.GetInitialize_eNB_args() = ''
|
||||
self.air_interface = 'lte'
|
||||
#self.eNB_instance = ''
|
||||
#self.eNB_serverId = ''
|
||||
#self.eNBLogFiles = ['', '', '']
|
||||
#self.eNBOptions = ['', '', '']
|
||||
#self.eNBmbmsEnables = [False, False, False]
|
||||
#self.eNBstatuses = [-1, -1, -1]
|
||||
self.ping_args = ''
|
||||
self.ping_packetloss_threshold = ''
|
||||
self.iperf_args = ''
|
||||
@@ -169,9 +98,6 @@ class OaiCiTest():
|
||||
self.x2NbENBs = 0
|
||||
self.x2ENBBsIds = []
|
||||
self.x2ENBConnectedUEs = []
|
||||
#self.htmlTabRefs = []
|
||||
#self.htmlTabNames = []
|
||||
#self.htmlTabIcons = []
|
||||
self.repeatCounts = []
|
||||
self.finalStatus = False
|
||||
self.OsVersion = ''
|
||||
@@ -246,7 +172,7 @@ class OaiCiTest():
|
||||
mismatch = True
|
||||
if not mismatch:
|
||||
SSH.close()
|
||||
HTML.CreateHtmlTestRow(RAN.GetBuild_eNB_args(), 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow(RAN.GetBuild_eNB_args(), 'OK', CONST.ALL_PROCESSES_OK)
|
||||
return
|
||||
|
||||
SSH.command('echo ' + self.UEPassword + ' | sudo -S git clean -x -d -ff', '\$', 30)
|
||||
@@ -291,11 +217,11 @@ class OaiCiTest():
|
||||
else:
|
||||
SSH.command('echo "MERGED_W_TGT_BRANCH: NO" >> ../LAST_BUILD_INFO.txt', '\$', 2)
|
||||
SSH.close()
|
||||
HTML.CreateHtmlTestRow(self.Build_OAI_UE_args, 'OK', ALL_PROCESSES_OK, 'OAI UE')
|
||||
HTML.CreateHtmlTestRow(self.Build_OAI_UE_args, 'OK', CONST.ALL_PROCESSES_OK, 'OAI UE')
|
||||
else:
|
||||
SSH.close()
|
||||
logging.error('\u001B[1m Building OAI UE Failed\u001B[0m')
|
||||
HTML.CreateHtmlTestRow(self.Build_OAI_UE_args, 'KO', ALL_PROCESSES_OK, 'OAI UE')
|
||||
HTML.CreateHtmlTestRow(self.Build_OAI_UE_args, 'KO', CONST.ALL_PROCESSES_OK, 'OAI UE')
|
||||
HTML.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -330,7 +256,7 @@ class OaiCiTest():
|
||||
self.flexranCtrlStarted = True
|
||||
RAN.SetflexranCtrlStarted(True)
|
||||
SSH.close()
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def InitializeUE_common(self, device_id, idx):
|
||||
try:
|
||||
@@ -393,7 +319,7 @@ class OaiCiTest():
|
||||
i += 1
|
||||
for job in multi_jobs:
|
||||
job.join()
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def InitializeOAIUE(self):
|
||||
if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '':
|
||||
@@ -551,23 +477,23 @@ class OaiCiTest():
|
||||
|
||||
SSH.close()
|
||||
if fullSyncStatus and gotSyncStatus and tunnelInterfaceStatus:
|
||||
HTML.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'OK', ALL_PROCESSES_OK, 'OAI UE')
|
||||
HTML.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'OK', CONST.ALL_PROCESSES_OK, 'OAI UE')
|
||||
logging.debug('\u001B[1m Initialize OAI UE Completed\u001B[0m')
|
||||
if (self.ADBIPAddress != 'none'):
|
||||
self.UEDevices = []
|
||||
self.UEDevices.append('OAI-UE')
|
||||
self.UEDevicesStatus = []
|
||||
self.UEDevicesStatus.append(UE_STATUS_DETACHED)
|
||||
self.UEDevicesStatus.append(CONST.UE_STATUS_DETACHED)
|
||||
else:
|
||||
if RAN.Getair_interface() == 'lte':
|
||||
if RAN.GeteNBmbmsEnables[0]:
|
||||
self.htmlUEFailureMsg = 'oaitun_ue1/oaitun_uem1 interfaces are either NOT mounted or NOT configured'
|
||||
else:
|
||||
self.htmlUEFailureMsg = 'oaitun_ue1 interface is either NOT mounted or NOT configured'
|
||||
HTML.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'KO', OAI_UE_PROCESS_NO_TUNNEL_INTERFACE, 'OAI UE')
|
||||
HTML.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'KO', CONST.OAI_UE_PROCESS_NO_TUNNEL_INTERFACE, 'OAI UE')
|
||||
else:
|
||||
self.htmlUEFailureMsg = 'nr-uesoftmodem did NOT synced'
|
||||
HTML.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'KO', OAI_UE_PROCESS_COULD_NOT_SYNC, 'OAI UE')
|
||||
HTML.CreateHtmlTestRow(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()
|
||||
|
||||
@@ -620,7 +546,7 @@ class OaiCiTest():
|
||||
# Force closure of picocom but device might still be locked
|
||||
SSH.close()
|
||||
self.picocom_closure = False
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
self.checkDevTTYisUnlocked()
|
||||
|
||||
def TerminateCatM(self):
|
||||
@@ -641,7 +567,7 @@ class OaiCiTest():
|
||||
logging.debug('\u001B[1m Cellular Functionality disabled\u001B[0m')
|
||||
SSH.close()
|
||||
self.picocom_closure = False
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
self.checkDevTTYisUnlocked()
|
||||
|
||||
def AttachCatM(self):
|
||||
@@ -902,7 +828,7 @@ class OaiCiTest():
|
||||
nb_ue_to_connect = 0
|
||||
for device_id in self.UEDevices:
|
||||
if (self.nbMaxUEtoAttach == -1) or (nb_ue_to_connect < self.nbMaxUEtoAttach):
|
||||
self.UEDevicesStatus[nb_ue_to_connect] = UE_STATUS_ATTACHING
|
||||
self.UEDevicesStatus[nb_ue_to_connect] = CONST.UE_STATUS_ATTACHING
|
||||
p = Process(target = self.AttachUE_common, args = (device_id, status_queue, lock,nb_ue_to_connect,))
|
||||
p.daemon = True
|
||||
p.start()
|
||||
@@ -912,7 +838,7 @@ class OaiCiTest():
|
||||
job.join()
|
||||
|
||||
if (status_queue.empty()):
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
self.AutoTerminateUEandeNB()
|
||||
return
|
||||
else:
|
||||
@@ -932,8 +858,8 @@ class OaiCiTest():
|
||||
if (attach_status):
|
||||
cnt = 0
|
||||
while cnt < len(self.UEDevices):
|
||||
if self.UEDevicesStatus[cnt] == UE_STATUS_ATTACHING:
|
||||
self.UEDevicesStatus[cnt] = UE_STATUS_ATTACHED
|
||||
if self.UEDevicesStatus[cnt] == CONST.UE_STATUS_ATTACHING:
|
||||
self.UEDevicesStatus[cnt] = CONST.UE_STATUS_ATTACHED
|
||||
cnt += 1
|
||||
HTML.CreateHtmlTestRowQueue('N/A', 'OK', len(self.UEDevices), html_queue)
|
||||
result = re.search('T_stdout', str(RAN.GetInitialize_eNB_args()))
|
||||
@@ -973,7 +899,7 @@ class OaiCiTest():
|
||||
multi_jobs = []
|
||||
cnt = 0
|
||||
for device_id in self.UEDevices:
|
||||
self.UEDevicesStatus[cnt] = UE_STATUS_DETACHING
|
||||
self.UEDevicesStatus[cnt] = CONST.UE_STATUS_DETACHING
|
||||
p = Process(target = self.DetachUE_common, args = (device_id,cnt,))
|
||||
p.daemon = True
|
||||
p.start()
|
||||
@@ -981,14 +907,14 @@ class OaiCiTest():
|
||||
cnt += 1
|
||||
for job in multi_jobs:
|
||||
job.join()
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
result = re.search('T_stdout', str(RAN.GetInitialize_eNB_args()))
|
||||
if result is not None:
|
||||
logging.debug('Waiting 5 seconds to fill up record file')
|
||||
time.sleep(5)
|
||||
cnt = 0
|
||||
while cnt < len(self.UEDevices):
|
||||
self.UEDevicesStatus[cnt] = UE_STATUS_DETACHED
|
||||
self.UEDevicesStatus[cnt] = CONST.UE_STATUS_DETACHED
|
||||
cnt += 1
|
||||
|
||||
def RebootUE_common(self, device_id):
|
||||
@@ -1049,7 +975,7 @@ class OaiCiTest():
|
||||
multi_jobs.append(p)
|
||||
for job in multi_jobs:
|
||||
job.join()
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def DataDisableUE_common(self, device_id, idx):
|
||||
try:
|
||||
@@ -1078,7 +1004,7 @@ class OaiCiTest():
|
||||
i += 1
|
||||
for job in multi_jobs:
|
||||
job.join()
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def DataEnableUE_common(self, device_id, idx):
|
||||
try:
|
||||
@@ -1107,7 +1033,7 @@ class OaiCiTest():
|
||||
i += 1
|
||||
for job in multi_jobs:
|
||||
job.join()
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def GetAllUEDevices(self, terminate_ue_flag):
|
||||
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
||||
@@ -1152,7 +1078,7 @@ class OaiCiTest():
|
||||
print('len(self.UEDevicesStatus) == 0')
|
||||
cnt = 0
|
||||
while cnt < len(self.UEDevices):
|
||||
self.UEDevicesStatus.append(UE_STATUS_DETACHED)
|
||||
self.UEDevicesStatus.append(CONST.UE_STATUS_DETACHED)
|
||||
cnt += 1
|
||||
|
||||
def GetAllCatMDevices(self, terminate_ue_flag):
|
||||
@@ -1272,7 +1198,7 @@ class OaiCiTest():
|
||||
htmlOptions = 'N/A'
|
||||
|
||||
if (status_queue.empty()):
|
||||
HTML.CreateHtmlTestRow(htmlOptions, 'KO', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow(htmlOptions, 'KO', CONST.ALL_PROCESSES_OK)
|
||||
self.AutoTerminateUEandeNB()
|
||||
else:
|
||||
check_status = True
|
||||
@@ -1319,8 +1245,8 @@ class OaiCiTest():
|
||||
SSH.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
|
||||
idx = 0
|
||||
for device_id in self.UEDevices:
|
||||
print('UE status attched'+UE_STATUS_ATTACHED)
|
||||
if self.UEDevicesStatus[idx] != UE_STATUS_ATTACHED:
|
||||
print('UE status attched'+CONST.UE_STATUS_ATTACHED)
|
||||
if self.UEDevicesStatus[idx] != CONST.UE_STATUS_ATTACHED:
|
||||
idx += 1
|
||||
continue
|
||||
count = 0
|
||||
@@ -1563,7 +1489,7 @@ class OaiCiTest():
|
||||
return
|
||||
ueIpStatus = self.GetAllUEIPAddresses()
|
||||
if (ueIpStatus < 0):
|
||||
HTML.CreateHtmlTestRow(self.ping_args, 'KO', UE_IP_ADDRESS_ISSUE)
|
||||
HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
||||
self.AutoTerminateUEandeNB()
|
||||
return
|
||||
multi_jobs = []
|
||||
@@ -1581,7 +1507,7 @@ class OaiCiTest():
|
||||
job.join()
|
||||
|
||||
if (status_queue.empty()):
|
||||
HTML.CreateHtmlTestRow(self.ping_args, 'KO', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.ALL_PROCESSES_OK)
|
||||
self.AutoTerminateUEandeNB()
|
||||
else:
|
||||
ping_status = True
|
||||
@@ -1998,7 +1924,7 @@ class OaiCiTest():
|
||||
if (device_id != 'OAI-UE'):
|
||||
SSH.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
|
||||
# if by chance ADB server and EPC are on the same remote host, at least log collection will take care of it
|
||||
SSH.command('if [ ! -d ' + EPC.GetSourceCodePath() + '/scripts ]; then mkdir -p ' + self.EPCSourceCodePath + '/scripts ; fi', '\$', 5)
|
||||
SSH.command('if [ ! -d ' + EPC.GetSourceCodePath() + '/scripts ]; then mkdir -p ' + EPC.GetSourceCodePath() + '/scripts ; fi', '\$', 5)
|
||||
SSH.command('cd ' + EPC.GetSourceCodePath() + '/scripts', '\$', 5)
|
||||
# Checking if iperf / iperf3 are installed
|
||||
if self.ADBCentralized:
|
||||
@@ -2306,7 +2232,7 @@ class OaiCiTest():
|
||||
ueIpStatus = self.GetAllUEIPAddresses()
|
||||
if (ueIpStatus < 0):
|
||||
logging.debug('going here')
|
||||
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', UE_IP_ADDRESS_ISSUE)
|
||||
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
||||
self.AutoTerminateUEandeNB()
|
||||
return
|
||||
|
||||
@@ -2338,7 +2264,7 @@ class OaiCiTest():
|
||||
job.join()
|
||||
|
||||
if (status_queue.empty()):
|
||||
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.ALL_PROCESSES_OK)
|
||||
self.AutoTerminateUEandeNB()
|
||||
else:
|
||||
iperf_status = True
|
||||
@@ -2406,7 +2332,7 @@ class OaiCiTest():
|
||||
status = status_queue.get()
|
||||
if (status < 0):
|
||||
result = status
|
||||
if result == ENB_PROCESS_FAILED:
|
||||
if result == CONST.ENB_PROCESS_FAILED:
|
||||
fileCheck = re.search('enb_', str(RAN.GeteNBLogFiles[0]))
|
||||
if fileCheck is not None:
|
||||
SSH.copyin(RAN.GeteNBIPAddress(), RAN.GeteNBUserName(), RAN.GeteNBPassword(), RAN.GeteNBSourceCodePath() + '/cmake_targets/' + RAN.GeteNBLogFiles[0], '.')
|
||||
@@ -2437,7 +2363,7 @@ class OaiCiTest():
|
||||
status = status_queue.get()
|
||||
if (status < 0):
|
||||
result = status
|
||||
if result == OAI_UE_PROCESS_FAILED:
|
||||
if result == CONST.OAI_UE_PROCESS_FAILED:
|
||||
fileCheck = re.search('ue_', str(self.UELogFile))
|
||||
if fileCheck is not None:
|
||||
SSH.copyin(self.UEIPAddress, self.UEUserName, self.UEPassword, self.UESourceCodePath + '/cmake_targets/' + self.UELogFile, '.')
|
||||
@@ -2453,9 +2379,9 @@ class OaiCiTest():
|
||||
result = re.search(RAN.Getair_interface() + '-uesoftmodem', SSH.getBefore())
|
||||
if result is None:
|
||||
logging.debug('\u001B[1;37;41m OAI UE Process Not Found! \u001B[0m')
|
||||
status_queue.put(OAI_UE_PROCESS_FAILED)
|
||||
status_queue.put(CONST.OAI_UE_PROCESS_FAILED)
|
||||
else:
|
||||
status_queue.put(OAI_UE_PROCESS_OK)
|
||||
status_queue.put(CONST.OAI_UE_PROCESS_OK)
|
||||
SSH.close()
|
||||
except:
|
||||
os.kill(os.getppid(),signal.SIGUSR1)
|
||||
@@ -2688,31 +2614,31 @@ class OaiCiTest():
|
||||
if foundSegFault:
|
||||
logging.debug('\u001B[1;37;41m UE ended with a Segmentation Fault! \u001B[0m')
|
||||
if not nrUEFlag:
|
||||
return OAI_UE_PROCESS_SEG_FAULT
|
||||
return CONST.OAI_UE_PROCESS_SEG_FAULT
|
||||
else:
|
||||
if not frequency_found:
|
||||
return OAI_UE_PROCESS_SEG_FAULT
|
||||
return CONST.OAI_UE_PROCESS_SEG_FAULT
|
||||
if foundAssertion:
|
||||
logging.debug('\u001B[1;30;43m UE showed an assertion! \u001B[0m')
|
||||
self.htmlUEFailureMsg += 'UE showed an assertion!\n'
|
||||
if not nrUEFlag:
|
||||
if not mib_found or not frequency_found:
|
||||
return OAI_UE_PROCESS_ASSERTION
|
||||
return CONST.OAI_UE_PROCESS_ASSERTION
|
||||
else:
|
||||
if not frequency_found:
|
||||
return OAI_UE_PROCESS_ASSERTION
|
||||
return CONST.OAI_UE_PROCESS_ASSERTION
|
||||
if foundRealTimeIssue:
|
||||
logging.debug('\u001B[1;37;41m UE faced real time issues! \u001B[0m')
|
||||
self.htmlUEFailureMsg += 'UE faced real time issues!\n'
|
||||
#return ENB_PROCESS_REALTIME_ISSUE
|
||||
#return CONST.ENB_PROCESS_REALTIME_ISSUE
|
||||
if nrUEFlag:
|
||||
if not frequency_found:
|
||||
return OAI_UE_PROCESS_COULD_NOT_SYNC
|
||||
return CONST.OAI_UE_PROCESS_COULD_NOT_SYNC
|
||||
else:
|
||||
if no_cell_sync_found and not mib_found:
|
||||
logging.debug('\u001B[1;37;41m UE could not synchronize ! \u001B[0m')
|
||||
self.htmlUEFailureMsg += 'UE could not synchronize!\n'
|
||||
return OAI_UE_PROCESS_COULD_NOT_SYNC
|
||||
return CONST.OAI_UE_PROCESS_COULD_NOT_SYNC
|
||||
return 0
|
||||
|
||||
|
||||
@@ -2729,7 +2655,7 @@ class OaiCiTest():
|
||||
time.sleep(1)
|
||||
SSH.close()
|
||||
self.flexranCtrlStarted = False
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def TerminateUE_common(self, device_id, idx):
|
||||
try:
|
||||
@@ -2772,7 +2698,7 @@ class OaiCiTest():
|
||||
i += 1
|
||||
for job in multi_jobs:
|
||||
job.join()
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def TerminateOAIUE(self):
|
||||
SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
|
||||
@@ -2795,7 +2721,7 @@ class OaiCiTest():
|
||||
if (copyin_res == -1):
|
||||
logging.debug('\u001B[1;37;41m Could not copy UE logfile to analyze it! \u001B[0m')
|
||||
self.htmlUEFailureMsg = 'Could not copy UE logfile to analyze it!'
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE, 'UE')
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE, 'UE')
|
||||
self.UELogFile = ''
|
||||
return
|
||||
logging.debug('\u001B[1m Analyzing UE logfile \u001B[0m')
|
||||
@@ -2812,20 +2738,20 @@ class OaiCiTest():
|
||||
if RAN.Getair_interface() == 'lte':
|
||||
# In case of sniffing on commercial eNBs we have random results
|
||||
# Not an error then
|
||||
if (logStatus != OAI_UE_PROCESS_COULD_NOT_SYNC) or (ueAction != 'Sniffing'):
|
||||
if (logStatus != CONST.OAI_UE_PROCESS_COULD_NOT_SYNC) or (ueAction != 'Sniffing'):
|
||||
self.Initialize_OAI_UE_args = ''
|
||||
self.AutoTerminateUEandeNB()
|
||||
else:
|
||||
if (logStatus == OAI_UE_PROCESS_COULD_NOT_SYNC):
|
||||
if (logStatus == CONST.OAI_UE_PROCESS_COULD_NOT_SYNC):
|
||||
self.Initialize_OAI_UE_args = ''
|
||||
self.AutoTerminateUEandeNB()
|
||||
else:
|
||||
logging.debug('\u001B[1m' + ueAction + ' Completed \u001B[0m')
|
||||
self.htmlUEFailureMsg = '<b>' + ueAction + ' Completed</b>\n' + self.htmlUEFailureMsg
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
self.UELogFile = ''
|
||||
else:
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def AutoTerminateUEandeNB(self):
|
||||
if (self.ADBIPAddress != 'none'):
|
||||
@@ -2857,7 +2783,7 @@ class OaiCiTest():
|
||||
|
||||
def IdleSleep(self):
|
||||
time.sleep(self.idle_sleep_time)
|
||||
HTML.CreateHtmlTestRow(str(self.idle_sleep_time) + ' sec', 'OK', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow(str(self.idle_sleep_time) + ' sec', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def X2_Status(self, idx, fileName):
|
||||
cmd = "curl --silent http://" + EPC.GetIPAddress() + ":9999/stats | jq '.' > " + fileName
|
||||
@@ -2967,7 +2893,7 @@ class OaiCiTest():
|
||||
html_queue.put(fullMessage)
|
||||
HTML.CreateHtmlTestRowQueue('N/A', 'OK', len(self.UEDevices), html_queue)
|
||||
else:
|
||||
HTML.CreateHtmlTestRow('Cannot perform requested X2 Handover', 'KO', ALL_PROCESSES_OK)
|
||||
HTML.CreateHtmlTestRow('Cannot perform requested X2 Handover', 'KO', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def LogCollectBuild(self):
|
||||
if (RAN.GeteNBIPAddress() != '' and RAN.GeteNBUserName() != '' and RAN.GeteNBPassword() != ''):
|
||||
@@ -3548,6 +3474,8 @@ elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
|
||||
HTML.SethtmlNb_CATM_Modules(len(CiTestObj.CatMDevices))
|
||||
HTML.CreateHtmlHeader(CiTestObj.ADBIPAddress)
|
||||
elif re.match('^FinalizeHtml$', mode, re.IGNORECASE):
|
||||
HTML.SetreseNB(RetrieveSystemVersion('eNB'))
|
||||
HTML.SetresUE(RetrieveSystemVersion('UE'))
|
||||
HTML.CreateHtmlFooter(CiTestObj.finalStatus)
|
||||
elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re.IGNORECASE):
|
||||
if re.match('^TesteNB$', mode, re.IGNORECASE):
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
# Python for CI of OAI-eNB + COTS-UE
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
# Required Python Package
|
||||
# pexpect
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Import
|
||||
#-----------------------------------------------------------
|
||||
@@ -19,47 +50,15 @@ import html as HTML
|
||||
|
||||
EPC = epc.EPCManagement()
|
||||
|
||||
ALL_PROCESSES_OK = CONST.ALL_PROCESSES_OK
|
||||
ENB_PROCESS_FAILED = CONST.ENB_PROCESS_FAILED
|
||||
ENB_PROCESS_OK = CONST.ENB_PROCESS_OK
|
||||
ENB_PROCESS_SEG_FAULT = CONST.ENB_PROCESS_SEG_FAULT
|
||||
ENB_PROCESS_ASSERTION = CONST.ENB_PROCESS_ASSERTION
|
||||
ENB_PROCESS_REALTIME_ISSUE = CONST.ENB_PROCESS_REALTIME_ISSUE
|
||||
ENB_PROCESS_NOLOGFILE_TO_ANALYZE = CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE
|
||||
ENB_PROCESS_SLAVE_RRU_NOT_SYNCED = CONST.ENB_PROCESS_SLAVE_RRU_NOT_SYNCED
|
||||
HSS_PROCESS_FAILED = CONST.HSS_PROCESS_FAILED
|
||||
HSS_PROCESS_OK = CONST.HSS_PROCESS_OK
|
||||
MME_PROCESS_FAILED = CONST.MME_PROCESS_FAILED
|
||||
MME_PROCESS_OK = CONST.MME_PROCESS_OK
|
||||
SPGW_PROCESS_FAILED = CONST.SPGW_PROCESS_FAILED
|
||||
SPGW_PROCESS_OK = CONST.SPGW_PROCESS_OK
|
||||
UE_IP_ADDRESS_ISSUE = CONST.UE_IP_ADDRESS_ISSUE
|
||||
OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE = CONST.OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE
|
||||
OAI_UE_PROCESS_COULD_NOT_SYNC = CONST.OAI_UE_PROCESS_COULD_NOT_SYNC
|
||||
OAI_UE_PROCESS_ASSERTION = CONST.OAI_UE_PROCESS_ASSERTION
|
||||
OAI_UE_PROCESS_FAILED = CONST.OAI_UE_PROCESS_FAILED
|
||||
OAI_UE_PROCESS_NO_TUNNEL_INTERFACE = CONST.OAI_UE_PROCESS_NO_TUNNEL_INTERFACE
|
||||
OAI_UE_PROCESS_SEG_FAULT = CONST.OAI_UE_PROCESS_SEG_FAULT
|
||||
OAI_UE_PROCESS_OK = CONST.OAI_UE_PROCESS_OK
|
||||
|
||||
UE_STATUS_DETACHED = CONST.UE_STATUS_DETACHED
|
||||
UE_STATUS_DETACHING = CONST.UE_STATUS_DETACHING
|
||||
UE_STATUS_ATTACHING = CONST.UE_STATUS_ATTACHING
|
||||
UE_STATUS_ATTACHED = CONST.UE_STATUS_ATTACHED
|
||||
|
||||
X2_HO_REQ_STATE__IDLE = CONST.X2_HO_REQ_STATE__IDLE
|
||||
X2_HO_REQ_STATE__TARGET_RECEIVES_REQ = CONST.X2_HO_REQ_STATE__TARGET_RECEIVES_REQ
|
||||
X2_HO_REQ_STATE__TARGET_RRC_RECFG_COMPLETE = CONST.X2_HO_REQ_STATE__TARGET_RRC_RECFG_COMPLETE
|
||||
X2_HO_REQ_STATE__TARGET_SENDS_SWITCH_REQ = CONST.X2_HO_REQ_STATE__TARGET_SENDS_SWITCH_REQ
|
||||
X2_HO_REQ_STATE__SOURCE_RECEIVES_REQ_ACK = CONST.X2_HO_REQ_STATE__SOURCE_RECEIVES_REQ_ACK
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Class Declaration
|
||||
#-----------------------------------------------------------
|
||||
class RANManagement():
|
||||
|
||||
def __init__(self):
|
||||
# self.FailReportCnt = 0
|
||||
# self.prematureExit = False
|
||||
|
||||
self.prematureExit = False
|
||||
self.ranRepository = ''
|
||||
self.ranBranch = ''
|
||||
self.ranAllowMerge = False
|
||||
@@ -77,14 +76,6 @@ class RANManagement():
|
||||
self.eNB2UserName = ''
|
||||
self.eNB2Password = ''
|
||||
self.eNB2SourceCodePath = ''
|
||||
#self.ADBIPAddress = ''
|
||||
#self.ADBUserName = ''
|
||||
#self.ADBPassword = ''
|
||||
#self.ADBCentralized = True
|
||||
self.testCase_id = ''
|
||||
#self.testXMLfiles = []
|
||||
#self.nbTestXMLfiles = 0
|
||||
#self.desc = ''
|
||||
self.Build_eNB_args = ''
|
||||
self.backgroundBuild = False
|
||||
self.backgroundBuildTestId = ['', '', '']
|
||||
@@ -96,60 +87,11 @@ class RANManagement():
|
||||
self.eNBLogFiles = ['', '', '']
|
||||
self.eNBOptions = ['', '', '']
|
||||
self.eNBmbmsEnables = [False, False, False]
|
||||
self.eNBstatuses = [-1, -1, -1]
|
||||
#self.ping_args = ''
|
||||
#self.ping_packetloss_threshold = ''
|
||||
#self.iperf_args = ''
|
||||
#self.iperf_packetloss_threshold = ''
|
||||
#self.iperf_profile = ''
|
||||
#self.iperf_options = ''
|
||||
#self.nbMaxUEtoAttach = -1
|
||||
#self.UEDevices = []
|
||||
#self.UEDevicesStatus = []
|
||||
#self.UEDevicesRemoteServer = []
|
||||
#self.UEDevicesRemoteUser = []
|
||||
#self.UEDevicesOffCmd = []
|
||||
#self.UEDevicesOnCmd = []
|
||||
#self.UEDevicesRebootCmd = []
|
||||
#self.CatMDevices = []
|
||||
#self.UEIPAddresses = []
|
||||
#self.htmlFile = ''
|
||||
#self.htmlHeaderCreated = False
|
||||
#self.htmlFooterCreated = False
|
||||
#self.htmlUEConnected = -1
|
||||
#self.htmleNBFailureMsg = ''
|
||||
#self.htmlUEFailureMsg = ''
|
||||
#self.picocom_closure = False
|
||||
#self.idle_sleep_time = 0
|
||||
#self.x2_ho_options = 'network'
|
||||
#self.x2NbENBs = 0
|
||||
#self.x2ENBBsIds = []
|
||||
#self.x2ENBConnectedUEs = []
|
||||
#self.htmlTabRefs = []
|
||||
#self.htmlTabNames = []
|
||||
#self.htmlTabIcons = []
|
||||
#self.repeatCounts = []
|
||||
#self.finalStatus = False
|
||||
#self.OsVersion = ''
|
||||
#self.KernelVersion = ''
|
||||
#self.UhdVersion = ''
|
||||
#self.UsrpBoard = ''
|
||||
#self.CpuNb = ''
|
||||
#self.CpuModel = ''
|
||||
#self.CpuMHz = ''
|
||||
#self.UEIPAddress = ''
|
||||
#self.UEUserName = ''
|
||||
#self.UEPassword = ''
|
||||
#self.UE_instance = ''
|
||||
#self.UESourceCodePath = ''
|
||||
#self.UELogFile = ''
|
||||
#self.Build_OAI_UE_args = ''
|
||||
#self.Initialize_OAI_UE_args = ''
|
||||
#self.clean_repository = True
|
||||
self.flexranCtrlInstalled = False
|
||||
self.flexranCtrlStarted = False
|
||||
#self.expectedNbOfConnectedUEs = 0
|
||||
#self.startTime = 0
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Setters and Getters
|
||||
#-----------------------------------------------------------
|
||||
|
||||
|
||||
def SettestCase_id(self,tcid):
|
||||
self.testCase_id = tcid
|
||||
@@ -247,10 +189,8 @@ class RANManagement():
|
||||
self.eNBstatuses = enbstatus
|
||||
def GeteNBstatuses(self):
|
||||
return self.eNBstatuses
|
||||
|
||||
|
||||
|
||||
def SeteNB1IPAddress(self, enb1ip):
|
||||
self.eNB1IPAddress = enb1ip
|
||||
def SeteNB1IPAddress(self,enb1ip):
|
||||
self.eNB1IPAddress = enb1ip
|
||||
def GeteNB1IPAddress(self):
|
||||
return self.eNB1IPAddress
|
||||
@@ -267,7 +207,7 @@ class RANManagement():
|
||||
def GeteNB1SourceCodePath(self):
|
||||
return self.eNB1SourceCodePath
|
||||
|
||||
def SeteNB2IPAddress(self, enbip):
|
||||
def SeteNB2IPAddress(self, enb2ip):
|
||||
self.eNB2IPAddress = enb2ip
|
||||
def GeteNB2IPAddress(self):
|
||||
return self.eNB2IPAddress
|
||||
@@ -289,6 +229,11 @@ class RANManagement():
|
||||
def GetprematureExit(self):
|
||||
return self.prematureExit
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# RAN management functions
|
||||
#-----------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
def BuildeNB(self):
|
||||
myHTML = HTML.HTMLManagement()
|
||||
@@ -296,10 +241,7 @@ class RANManagement():
|
||||
GenericHelp(Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
if self.eNB_serverId == '0':
|
||||
#checkpoint enB_serverId
|
||||
lIpAddr = self.eNBIPAddress
|
||||
print(self.eNBIPAddress + 'self.eNBIPAddress')
|
||||
print(lIpAddr + 'lIpAddr')
|
||||
lUserName = self.eNBUserName
|
||||
lPassWord = self.eNBPassword
|
||||
lSourcePath = self.eNBSourceCodePath
|
||||
@@ -313,7 +255,6 @@ class RANManagement():
|
||||
lUserName = self.eNB2UserName
|
||||
lPassWord = self.eNB2Password
|
||||
lSourcePath = self.eNB2SourceCodePath
|
||||
print(lIpAddr + 'just before the error')
|
||||
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
|
||||
GenericHelp(Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
@@ -368,7 +309,7 @@ class RANManagement():
|
||||
mismatch = True
|
||||
if not mismatch:
|
||||
mySSH.close()
|
||||
myHTML.CreateHtmlTestRow(self.Build_eNB_args, 'OK', ALL_PROCESSES_OK)
|
||||
myHTML.CreateHtmlTestRow(self.Build_eNB_args, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
return
|
||||
|
||||
mySSH.command('echo ' + lPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
|
||||
@@ -394,7 +335,7 @@ class RANManagement():
|
||||
mySSH.command('chmod 775 ./my-lte-softmodem-build.sh', '\$', 5)
|
||||
mySSH.command('echo ' + lPassWord + ' | sudo -S -E daemon --inherit --unsafe --name=build_enb_daemon --chdir=' + lSourcePath + '/cmake_targets -o ' + lSourcePath + '/cmake_targets/compile_oai_enb.log ./my-lte-softmodem-build.sh', '\$', 5)
|
||||
mySSH.close()
|
||||
myHTML.CreateHtmlTestRow(self.Build_eNB_args, 'OK', ALL_PROCESSES_OK)
|
||||
myHTML.CreateHtmlTestRow(self.Build_eNB_args, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
self.backgroundBuildTestId[int(self.eNB_instance)] = self.testCase_id
|
||||
return
|
||||
mySSH.command('stdbuf -o0 ./build_oai ' + self.Build_eNB_args + ' 2>&1 | stdbuf -o0 tee compile_oai_enb.log', 'Bypassing the Tests|build have failed', 1500)
|
||||
@@ -485,10 +426,10 @@ class RANManagement():
|
||||
|
||||
if buildStatus:
|
||||
logging.info('\u001B[1m Building OAI ' + nodeB_prefix + 'NB Pass\u001B[0m')
|
||||
myHTML.CreateHtmlTestRow(self.Build_eNB_args, 'OK', ALL_PROCESSES_OK)
|
||||
myHTML.CreateHtmlTestRow(self.Build_eNB_args, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
logging.error('\u001B[1m Building OAI ' + nodeB_prefix + 'NB Failed\u001B[0m')
|
||||
myHTML.CreateHtmlTestRow(self.Build_eNB_args, 'KO', ALL_PROCESSES_OK)
|
||||
myHTML.CreateHtmlTestRow(self.Build_eNB_args, 'KO', CONST.ALL_PROCESSES_OK)
|
||||
myHTML.CreateHtmlTabFooter(False)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -514,9 +455,7 @@ class RANManagement():
|
||||
GenericHelp(Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
mySSH = SSH.SSHConnection()
|
||||
#check_eNB = False
|
||||
#check_OAI_UE = False
|
||||
#pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE)
|
||||
|
||||
if (self.pStatus < 0):
|
||||
myHTML.CreateHtmlTestRow(self.Initialize_eNB_args, 'KO', self.pStatus)
|
||||
myHTML.CreateHtmlTabFooter(False)
|
||||
@@ -620,7 +559,7 @@ class RANManagement():
|
||||
mySSH.close()
|
||||
doLoop = False
|
||||
logging.error('\u001B[1;37;41m eNB logging system did not show got sync! \u001B[0m')
|
||||
myHTML.CreateHtmlTestRow('-O ' + config_file + extra_options, 'KO', ALL_PROCESSES_OK)
|
||||
myHTML.CreateHtmlTestRow('-O ' + config_file + extra_options, 'KO', CONST.ALL_PROCESSES_OK)
|
||||
# In case of T tracer recording, we need to kill tshark on EPC side
|
||||
result = re.search('T_stdout', str(self.Initialize_eNB_args))
|
||||
if result is not None:
|
||||
@@ -670,7 +609,7 @@ class RANManagement():
|
||||
self.eNBstatuses[int(self.eNB_instance)] = int(self.eNB_serverId)
|
||||
|
||||
mySSH.close()
|
||||
myHTML.CreateHtmlTestRow('-O ' + config_file + extra_options, 'OK', ALL_PROCESSES_OK)
|
||||
myHTML.CreateHtmlTestRow('-O ' + config_file + extra_options, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
logging.debug('\u001B[1m Initialize eNB Completed\u001B[0m')
|
||||
|
||||
|
||||
@@ -700,9 +639,9 @@ class RANManagement():
|
||||
result = re.search(self.air_interface + '-softmodem', mySSH.getBefore())
|
||||
if result is None:
|
||||
logging.debug('\u001B[1;37;41m eNB Process Not Found! \u001B[0m')
|
||||
status_queue.put(ENB_PROCESS_FAILED)
|
||||
status_queue.put(CONST.ENB_PROCESS_FAILED)
|
||||
else:
|
||||
status_queue.put(ENB_PROCESS_OK)
|
||||
status_queue.put(CONST.ENB_PROCESS_OK)
|
||||
mySSH.close()
|
||||
except:
|
||||
os.kill(os.getppid(),signal.SIGUSR1)
|
||||
@@ -776,7 +715,7 @@ class RANManagement():
|
||||
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/' + extracted_log_file, '.')
|
||||
logging.debug('\u001B[1m Analyzing eNB replay logfile \u001B[0m')
|
||||
logStatus = self.AnalyzeLogFile_eNB(extracted_log_file)
|
||||
myHTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
myHTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
self.eNBLogFiles[int(self.eNB_instance)] = ''
|
||||
else:
|
||||
analyzeFile = False
|
||||
@@ -789,7 +728,7 @@ class RANManagement():
|
||||
if (copyin_res == -1):
|
||||
logging.debug('\u001B[1;37;41m Could not copy ' + nodeB_prefix + 'NB logfile to analyze it! \u001B[0m')
|
||||
self.htmleNBFailureMsg = 'Could not copy ' + nodeB_prefix + 'NB logfile to analyze it!'
|
||||
myHTML.CreateHtmlTestRow('N/A', 'KO', ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
|
||||
myHTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
|
||||
self.eNBmbmsEnables[int(self.eNB_instance)] = False
|
||||
return
|
||||
if self.eNB_serverId != '0':
|
||||
@@ -802,9 +741,9 @@ class RANManagement():
|
||||
self.eNBmbmsEnables[int(self.eNB_instance)] = False
|
||||
return
|
||||
else:
|
||||
myHTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
myHTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
else:
|
||||
myHTML.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
myHTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
self.eNBmbmsEnables[int(self.eNB_instance)] = False
|
||||
self.eNBstatuses[int(self.eNB_instance)] = -1
|
||||
|
||||
@@ -849,34 +788,34 @@ class RANManagement():
|
||||
isRRU = False
|
||||
isSlave = False
|
||||
slaveReceivesFrameResyncCmd = False
|
||||
X2HO_state = X2_HO_REQ_STATE__IDLE
|
||||
X2HO_state = CONST.X2_HO_REQ_STATE__IDLE
|
||||
X2HO_inNbProcedures = 0
|
||||
X2HO_outNbProcedures = 0
|
||||
for line in enb_log_file.readlines():
|
||||
if X2HO_state == X2_HO_REQ_STATE__IDLE:
|
||||
if X2HO_state == CONST.X2_HO_REQ_STATE__IDLE:
|
||||
result = re.search('target eNB Receives X2 HO Req X2AP_HANDOVER_REQ', str(line))
|
||||
if result is not None:
|
||||
X2HO_state = X2_HO_REQ_STATE__TARGET_RECEIVES_REQ
|
||||
X2HO_state = CONST.X2_HO_REQ_STATE__TARGET_RECEIVES_REQ
|
||||
result = re.search('source eNB receives the X2 HO ACK X2AP_HANDOVER_REQ_ACK', str(line))
|
||||
if result is not None:
|
||||
X2HO_state = X2_HO_REQ_STATE__SOURCE_RECEIVES_REQ_ACK
|
||||
if X2HO_state == X2_HO_REQ_STATE__TARGET_RECEIVES_REQ:
|
||||
X2HO_state = CONST.X2_HO_REQ_STATE__SOURCE_RECEIVES_REQ_ACK
|
||||
if X2HO_state == CONST.X2_HO_REQ_STATE__TARGET_RECEIVES_REQ:
|
||||
result = re.search('Received LTE_RRCConnectionReconfigurationComplete from UE', str(line))
|
||||
if result is not None:
|
||||
X2HO_state = X2_HO_REQ_STATE__TARGET_RRC_RECFG_COMPLETE
|
||||
if X2HO_state == X2_HO_REQ_STATE__TARGET_RRC_RECFG_COMPLETE:
|
||||
X2HO_state = CONST.X2_HO_REQ_STATE__TARGET_RRC_RECFG_COMPLETE
|
||||
if X2HO_state == CONST.X2_HO_REQ_STATE__TARGET_RRC_RECFG_COMPLETE:
|
||||
result = re.search('issue rrc_eNB_send_PATH_SWITCH_REQ', str(line))
|
||||
if result is not None:
|
||||
X2HO_state = X2_HO_REQ_STATE__TARGET_SENDS_SWITCH_REQ
|
||||
if X2HO_state == X2_HO_REQ_STATE__TARGET_SENDS_SWITCH_REQ:
|
||||
X2HO_state = CONST.X2_HO_REQ_STATE__TARGET_SENDS_SWITCH_REQ
|
||||
if X2HO_state == CONST.X2_HO_REQ_STATE__TARGET_SENDS_SWITCH_REQ:
|
||||
result = re.search('received path switch ack S1AP_PATH_SWITCH_REQ_ACK', str(line))
|
||||
if result is not None:
|
||||
X2HO_state = X2_HO_REQ_STATE__IDLE
|
||||
X2HO_state = CONST.X2_HO_REQ_STATE__IDLE
|
||||
X2HO_inNbProcedures += 1
|
||||
if X2HO_state == X2_HO_REQ_STATE__SOURCE_RECEIVES_REQ_ACK:
|
||||
if X2HO_state == CONST.X2_HO_REQ_STATE__SOURCE_RECEIVES_REQ_ACK:
|
||||
result = re.search('source eNB receives the X2 UE CONTEXT RELEASE X2AP_UE_CONTEXT_RELEASE', str(line))
|
||||
if result is not None:
|
||||
X2HO_state = X2_HO_REQ_STATE__IDLE
|
||||
X2HO_state = CONST.X2_HO_REQ_STATE__IDLE
|
||||
X2HO_outNbProcedures += 1
|
||||
|
||||
if self.eNBOptions[int(self.eNB_instance)] != '':
|
||||
@@ -1057,14 +996,14 @@ class RANManagement():
|
||||
logging.debug('\u001B[1;37;41m ' + rruMsg + ' \u001B[0m')
|
||||
self.htmleNBFailureMsg += rruMsg + '\n'
|
||||
self.prematureExit(True)
|
||||
return ENB_PROCESS_SLAVE_RRU_NOT_SYNCED
|
||||
return CONST.ENB_PROCESS_SLAVE_RRU_NOT_SYNCED
|
||||
if foundSegFault:
|
||||
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB ended with a Segmentation Fault! \u001B[0m')
|
||||
return ENB_PROCESS_SEG_FAULT
|
||||
return CONST.ENB_PROCESS_SEG_FAULT
|
||||
if foundAssertion:
|
||||
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB ended with an assertion! \u001B[0m')
|
||||
self.htmleNBFailureMsg += msgAssertion
|
||||
return ENB_PROCESS_ASSERTION
|
||||
return CONST.ENB_PROCESS_ASSERTION
|
||||
if foundRealTimeIssue:
|
||||
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB faced real time issues! \u001B[0m')
|
||||
self.htmleNBFailureMsg += nodeB_prefix + 'NB faced real time issues!\n'
|
||||
@@ -1073,5 +1012,5 @@ class RANManagement():
|
||||
rlcMsg = nodeB_prefix + 'NB RLC discarded ' + str(rlcDiscardBuffer) + ' buffer(s)'
|
||||
logging.debug('\u001B[1;37;41m ' + rlcMsg + ' \u001B[0m')
|
||||
self.htmleNBFailureMsg += rlcMsg + '\n'
|
||||
return ENB_PROCESS_REALTIME_ISSUE
|
||||
return CONST.ENB_PROCESS_REALTIME_ISSUE
|
||||
return 0
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
# Python for CI of OAI-eNB + COTS-UE
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
# Required Python Package
|
||||
# pexpect
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Import
|
||||
#-----------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user