Commit 6215c74b authored by Raphael Defosseux's avatar Raphael Defosseux

CI: downgrading CDRX testing to a single UE

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 10dbfff5
...@@ -58,6 +58,11 @@ OAI_UE_PROCESS_FAILED = -23 ...@@ -58,6 +58,11 @@ OAI_UE_PROCESS_FAILED = -23
OAI_UE_PROCESS_NO_TUNNEL_INTERFACE = -24 OAI_UE_PROCESS_NO_TUNNEL_INTERFACE = -24
OAI_UE_PROCESS_OK = +6 OAI_UE_PROCESS_OK = +6
UE_STATUS_DETACHED = 0
UE_STATUS_DETACHING = 1
UE_STATUS_ATTACHING = 2
UE_STATUS_ATTACHED = 3
#----------------------------------------------------------- #-----------------------------------------------------------
# Import # Import
#----------------------------------------------------------- #-----------------------------------------------------------
...@@ -127,6 +132,7 @@ class SSHConnection(): ...@@ -127,6 +132,7 @@ class SSHConnection():
self.iperf_profile = '' self.iperf_profile = ''
self.nbMaxUEtoAttach = -1 self.nbMaxUEtoAttach = -1
self.UEDevices = [] self.UEDevices = []
self.UEDevicesStatus = []
self.CatMDevices = [] self.CatMDevices = []
self.UEIPAddresses = [] self.UEIPAddresses = []
self.htmlFile = '' self.htmlFile = ''
...@@ -1237,6 +1243,7 @@ class SSHConnection(): ...@@ -1237,6 +1243,7 @@ class SSHConnection():
nb_ue_to_connect = 0 nb_ue_to_connect = 0
for device_id in self.UEDevices: for device_id in self.UEDevices:
if (self.nbMaxUEtoAttach == -1) or (nb_ue_to_connect < self.nbMaxUEtoAttach): if (self.nbMaxUEtoAttach == -1) or (nb_ue_to_connect < self.nbMaxUEtoAttach):
self.UEDevicesStatus[nb_ue_to_connect] = UE_STATUS_ATTACHING
p = Process(target = self.AttachUE_common, args = (device_id, status_queue, lock,)) p = Process(target = self.AttachUE_common, args = (device_id, status_queue, lock,))
p.daemon = True p.daemon = True
p.start() p.start()
...@@ -1265,6 +1272,11 @@ class SSHConnection(): ...@@ -1265,6 +1272,11 @@ class SSHConnection():
html_cell = '<pre style="background-color:white">UE (' + device_id + ')\n' + message + ' in ' + str(count + 2) + ' seconds</pre>' html_cell = '<pre style="background-color:white">UE (' + device_id + ')\n' + message + ' in ' + str(count + 2) + ' seconds</pre>'
html_queue.put(html_cell) html_queue.put(html_cell)
if (attach_status): if (attach_status):
cnt = 0
while cnt < len(self.UEDevices):
if self.UEDevicesStatus[cnt] == UE_STATUS_ATTACHING:
self.UEDevicesStatus[cnt] = UE_STATUS_ATTACHED
cnt += 1
self.CreateHtmlTestRowQueue('N/A', 'OK', len(self.UEDevices), html_queue) self.CreateHtmlTestRowQueue('N/A', 'OK', len(self.UEDevices), html_queue)
result = re.search('T_stdout', str(self.Initialize_eNB_args)) result = re.search('T_stdout', str(self.Initialize_eNB_args))
if result is not None: if result is not None:
...@@ -1298,11 +1310,14 @@ class SSHConnection(): ...@@ -1298,11 +1310,14 @@ class SSHConnection():
self.CreateHtmlTabFooter(False) self.CreateHtmlTabFooter(False)
sys.exit(1) sys.exit(1)
multi_jobs = [] multi_jobs = []
cnt = 0
for device_id in self.UEDevices: for device_id in self.UEDevices:
self.UEDevicesStatus[cnt] = UE_STATUS_DETACHING
p = Process(target = self.DetachUE_common, args = (device_id,)) p = Process(target = self.DetachUE_common, args = (device_id,))
p.daemon = True p.daemon = True
p.start() p.start()
multi_jobs.append(p) multi_jobs.append(p)
cnt += 1
for job in multi_jobs: for job in multi_jobs:
job.join() job.join()
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
...@@ -1310,6 +1325,10 @@ class SSHConnection(): ...@@ -1310,6 +1325,10 @@ class SSHConnection():
if result is not None: if result is not None:
logging.debug('Waiting 5 seconds to fill up record file') logging.debug('Waiting 5 seconds to fill up record file')
time.sleep(5) time.sleep(5)
cnt = 0
while cnt < len(self.UEDevices):
self.UEDevicesStatus[cnt] = UE_STATUS_DETACHED
cnt += 1
def RebootUE_common(self, device_id): def RebootUE_common(self, device_id):
try: try:
...@@ -1430,6 +1449,11 @@ class SSHConnection(): ...@@ -1430,6 +1449,11 @@ class SSHConnection():
if len(self.UEDevices) == 0: if len(self.UEDevices) == 0:
logging.debug('\u001B[1;37;41m UE Not Found! \u001B[0m') logging.debug('\u001B[1;37;41m UE Not Found! \u001B[0m')
sys.exit(1) sys.exit(1)
if len(self.UEDevicesStatus) == 0:
cnt = 0
while cnt < len(self.UEDevices):
self.UEDevicesStatus.append(UE_STATUS_DETACHED)
cnt += 1
self.close() self.close()
def GetAllCatMDevices(self, terminate_ue_flag): def GetAllCatMDevices(self, terminate_ue_flag):
...@@ -1580,7 +1604,11 @@ class SSHConnection(): ...@@ -1580,7 +1604,11 @@ class SSHConnection():
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)
idx = 0
for device_id in self.UEDevices: for device_id in self.UEDevices:
if self.UEDevicesStatus[idx] != UE_STATUS_ATTACHED:
idx += 1
continue
count = 0 count = 0
while count < 4: while count < 4:
self.command('stdbuf -o0 adb -s ' + device_id + ' shell ip addr show | grep rmnet', '\$', 15) self.command('stdbuf -o0 adb -s ' + device_id + ' shell ip addr show | grep rmnet', '\$', 15)
...@@ -1602,6 +1630,7 @@ class SSHConnection(): ...@@ -1602,6 +1630,7 @@ class SSHConnection():
ue_ip_status -= 1 ue_ip_status -= 1
continue continue
self.UEIPAddresses.append(UE_IPAddress) self.UEIPAddresses.append(UE_IPAddress)
idx += 1
self.close() self.close()
return ue_ip_status return ue_ip_status
......
...@@ -28,12 +28,19 @@ ...@@ -28,12 +28,19 @@
030201 030201
040101 040101
030111 040301 040511 040613 040614 040615 040616 040617 040651 040652 040653 040654 040401 040201 030201 030111 040301 040511 040613 040614 040615 040616 040617 040651 040652 040653 040654 040401 040201 030201
030112 040302 040512 040612 040650 040401 040201 030201
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="030111"> <testCase id="030111">
<class>Initialize_eNB</class> <class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/10MHz)</desc> <desc>Initialize eNB (FDD/Band7/10MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf --eNBs.[0].component_carriers.[0].drx_Config_present prRelease</Initialize_eNB_args>
</testCase>
<testCase id="030112">
<class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/10MHz) with CDRX</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf</Initialize_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf</Initialize_eNB_args>
</testCase> </testCase>
...@@ -57,6 +64,12 @@ ...@@ -57,6 +64,12 @@
<desc>Attach UE</desc> <desc>Attach UE</desc>
</testCase> </testCase>
<testCase id="040302">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<nbMaxUEtoAttach>1</nbMaxUEtoAttach>
</testCase>
<testCase id="040401"> <testCase id="040401">
<class>Detach_UE</class> <class>Detach_UE</class>
<desc>Detach UE</desc> <desc>Detach UE</desc>
...@@ -69,6 +82,21 @@ ...@@ -69,6 +82,21 @@
<ping_packetloss_threshold>5</ping_packetloss_threshold> <ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase> </testCase>
<testCase id="040512">
<class>Ping</class>
<desc>ping (10MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040612">
<class>Iperf</class>
<desc>iperf (10MHz - DL/30Mbps/UDP)(30 sec)(balanced profile)</desc>
<iperf_args>-u -b 30M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040613"> <testCase id="040613">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (10MHz - DL/30Mbps/UDP)(30 sec)(balanced profile)</desc> <desc>iperf (10MHz - DL/30Mbps/UDP)(30 sec)(balanced profile)</desc>
...@@ -109,6 +137,14 @@ ...@@ -109,6 +137,14 @@
<iperf_profile>balanced</iperf_profile> <iperf_profile>balanced</iperf_profile>
</testCase> </testCase>
<testCase id="040650">
<class>Iperf</class>
<desc>iperf (10MHz - UL/20Mbps/UDP)(30 sec)(balanced profile)</desc>
<iperf_args>-u -b 20M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040651"> <testCase id="040651">
<class>Iperf</class> <class>Iperf</class>
<desc>iperf (10MHz - UL/20Mbps/UDP)(30 sec)(balanced profile)</desc> <desc>iperf (10MHz - UL/20Mbps/UDP)(30 sec)(balanced profile)</desc>
......
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