Commit 562fd82f authored by Raphael Defosseux's avatar Raphael Defosseux

CI: better handling of the case when no UE is connected to ADB server

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 6828ebe1
......@@ -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 == '':
......
......@@ -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':
......
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