Commit 711f7dd2 authored by Raphael Defosseux's avatar Raphael Defosseux

CI: fix when OAI-UE IP address is not retrievable

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent c5d1a8b8
...@@ -1188,9 +1188,13 @@ class SSHConnection(): ...@@ -1188,9 +1188,13 @@ class SSHConnection():
self.open(self.UEIPAddress, self.UEUserName, self.UEPassword) self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
self.command('ifconfig oaitun_ue1', '\$', 4) self.command('ifconfig oaitun_ue1', '\$', 4)
result = re.search('inet addr:(?P<ueipaddress>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', str(self.ssh.before)) result = re.search('inet addr:(?P<ueipaddress>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', str(self.ssh.before))
if result is not None:
UE_IPAddress = result.group('ueipaddress') UE_IPAddress = result.group('ueipaddress')
logging.debug('\u001B[1mUE (' + self.UEDevices[0] + ') IP Address is ' + UE_IPAddress + '\u001B[0m') logging.debug('\u001B[1mUE (' + self.UEDevices[0] + ') IP Address is ' + UE_IPAddress + '\u001B[0m')
self.UEIPAddresses.append(UE_IPAddress) self.UEIPAddresses.append(UE_IPAddress)
else:
logging.debug('\u001B[1;37;41m UE IP Address Not Found! \u001B[0m')
ue_ip_status -= 1
self.close() self.close()
return ue_ip_status return ue_ip_status
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword) self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
......
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