CI: better handling of the case when no UE is connected to ADB server
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
@@ -1157,15 +1157,18 @@ class OaiCiTest():
|
||||
self.UEDevicesRebootCmd.append(comma_split[5])
|
||||
phone_list_file.close()
|
||||
|
||||
# better handling of the case when no UE detected
|
||||
# Sys-exit is now dealt by the calling function
|
||||
if terminate_ue_flag == True:
|
||||
if len(self.UEDevices) == 0:
|
||||
logging.debug('\u001B[1;37;41m UE Not Found! \u001B[0m')
|
||||
sys.exit(1)
|
||||
return False
|
||||
if len(self.UEDevicesStatus) == 0:
|
||||
cnt = 0
|
||||
while cnt < len(self.UEDevices):
|
||||
self.UEDevicesStatus.append(CONST.UE_STATUS_DETACHED)
|
||||
cnt += 1
|
||||
return True
|
||||
|
||||
def GetAllCatMDevices(self, terminate_ue_flag):
|
||||
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
||||
|
||||
+5
-1
@@ -620,7 +620,11 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
if (CiTestObj.ADBIPAddress != 'none'):
|
||||
#in these cases, having no devices is critical, GetAllUEDevices function has to manage it as a critical error, reason why terminate_ue_flag is set to True
|
||||
terminate_ue_flag = True
|
||||
CiTestObj.GetAllUEDevices(terminate_ue_flag)
|
||||
# Now we stop properly the test-suite --> clean reporting
|
||||
status = CiTestObj.GetAllUEDevices(terminate_ue_flag)
|
||||
if not status:
|
||||
RAN.prematureExit = True
|
||||
break
|
||||
if action == 'Build_eNB':
|
||||
RAN.BuildeNB()
|
||||
elif action == 'WaitEndBuild_eNB':
|
||||
|
||||
Reference in New Issue
Block a user