CI: final python fixes for OAI-UE <-> OAI-eNB connection test
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
+27
-10
@@ -333,7 +333,7 @@ class SSHConnection():
|
|||||||
self.command('mkdir -p log', '\$', 5)
|
self.command('mkdir -p log', '\$', 5)
|
||||||
self.command('chmod 777 log', '\$', 5)
|
self.command('chmod 777 log', '\$', 5)
|
||||||
# no need to remove in log (git clean did the trick)
|
# no need to remove in log (git clean did the trick)
|
||||||
self.command('stdbuf -o0 ./build_oai ' + self.Build_eNB_args + ' 2>&1 | stdbuf -o0 tee -a compile_oai_enb.log', 'Bypassing the Tests', 600)
|
self.command('stdbuf -o0 ./build_oai ' + self.Build_eNB_args + ' 2>&1 | stdbuf -o0 tee compile_oai_enb.log', 'Bypassing the Tests', 600)
|
||||||
self.command('mkdir -p build_log_' + self.testCase_id, '\$', 5)
|
self.command('mkdir -p build_log_' + self.testCase_id, '\$', 5)
|
||||||
self.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5)
|
self.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5)
|
||||||
self.command('mv compile_oai_enb.log ' + 'build_log_' + self.testCase_id, '\$', 5)
|
self.command('mv compile_oai_enb.log ' + 'build_log_' + self.testCase_id, '\$', 5)
|
||||||
@@ -369,7 +369,7 @@ class SSHConnection():
|
|||||||
self.command('mkdir -p log', '\$', 5)
|
self.command('mkdir -p log', '\$', 5)
|
||||||
self.command('chmod 777 log', '\$', 5)
|
self.command('chmod 777 log', '\$', 5)
|
||||||
# no need to remove in log (git clean did the trick)
|
# no need to remove in log (git clean did the trick)
|
||||||
self.command('stdbuf -o0 ./build_oai ' + self.Build_OAI_UE_args + ' 2>&1 | stdbuf -o0 tee -a compile_oai_ue.log', 'Bypassing the Tests', 600)
|
self.command('stdbuf -o0 ./build_oai ' + self.Build_OAI_UE_args + ' 2>&1 | stdbuf -o0 tee compile_oai_ue.log', 'Bypassing the Tests', 600)
|
||||||
self.command('mkdir -p build_log_' + self.testCase_id, '\$', 5)
|
self.command('mkdir -p build_log_' + self.testCase_id, '\$', 5)
|
||||||
self.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5)
|
self.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5)
|
||||||
self.command('mv compile_oai_ue.log ' + 'build_log_' + self.testCase_id, '\$', 5)
|
self.command('mv compile_oai_ue.log ' + 'build_log_' + self.testCase_id, '\$', 5)
|
||||||
@@ -813,7 +813,7 @@ class SSHConnection():
|
|||||||
return
|
return
|
||||||
ping_time = re.findall("-c (\d+)",str(self.ping_args))
|
ping_time = re.findall("-c (\d+)",str(self.ping_args))
|
||||||
device_id = 'catm'
|
device_id = 'catm'
|
||||||
ping_status = self.command('stdbuf -o0 ping ' + self.ping_args + ' ' + str(moduleIPAddr) + ' 2>&1 | stdbuf -o0 tee -a ping_' + self.testCase_id + '_' + device_id + '.log', '\$', int(ping_time[0])*1.5)
|
ping_status = self.command('stdbuf -o0 ping ' + self.ping_args + ' ' + str(moduleIPAddr) + ' 2>&1 | stdbuf -o0 tee ping_' + self.testCase_id + '_' + device_id + '.log', '\$', int(ping_time[0])*1.5)
|
||||||
# TIMEOUT CASE
|
# TIMEOUT CASE
|
||||||
if ping_status < 0:
|
if ping_status < 0:
|
||||||
message = 'Ping with UE (' + str(moduleIPAddr) + ') crashed due to TIMEOUT!'
|
message = 'Ping with UE (' + str(moduleIPAddr) + ') crashed due to TIMEOUT!'
|
||||||
@@ -1146,7 +1146,7 @@ class SSHConnection():
|
|||||||
self.command('cd ' + self.EPCSourceCodePath, '\$', 5)
|
self.command('cd ' + self.EPCSourceCodePath, '\$', 5)
|
||||||
self.command('cd scripts', '\$', 5)
|
self.command('cd scripts', '\$', 5)
|
||||||
ping_time = re.findall("-c (\d+)",str(self.ping_args))
|
ping_time = re.findall("-c (\d+)",str(self.ping_args))
|
||||||
ping_status = self.command('stdbuf -o0 ping ' + self.ping_args + ' ' + UE_IPAddress + ' 2>&1 | stdbuf -o0 tee -a ping_' + self.testCase_id + '_' + device_id + '.log', '\$', int(ping_time[0])*1.5)
|
ping_status = self.command('stdbuf -o0 ping ' + self.ping_args + ' ' + UE_IPAddress + ' 2>&1 | stdbuf -o0 tee ping_' + self.testCase_id + '_' + device_id + '.log', '\$', int(ping_time[0])*1.5)
|
||||||
# TIMEOUT CASE
|
# TIMEOUT CASE
|
||||||
if ping_status < 0:
|
if ping_status < 0:
|
||||||
message = 'Ping with UE (' + str(UE_IPAddress) + ') crashed due to TIMEOUT!'
|
message = 'Ping with UE (' + str(UE_IPAddress) + ') crashed due to TIMEOUT!'
|
||||||
@@ -1233,7 +1233,7 @@ class SSHConnection():
|
|||||||
self.command('cd ' + self.UESourceCodePath + '/cmake_targets/', '\$', 5)
|
self.command('cd ' + self.UESourceCodePath + '/cmake_targets/', '\$', 5)
|
||||||
self.command('cd cmake_targets', '\$', 5)
|
self.command('cd cmake_targets', '\$', 5)
|
||||||
ping_time = re.findall("-c (\d+)",str(self.ping_args))
|
ping_time = re.findall("-c (\d+)",str(self.ping_args))
|
||||||
ping_status = self.command('stdbuf -o0 ping ' + self.ping_args + ' 2>&1 | stdbuf -o0 tee -a ping_' + self.testCase_id + '.log', '\$', int(ping_time[0])*1.5)
|
ping_status = self.command('stdbuf -o0 ping ' + self.ping_args + ' 2>&1 | stdbuf -o0 tee ping_' + self.testCase_id + '.log', '\$', int(ping_time[0])*1.5)
|
||||||
# TIMEOUT CASE
|
# TIMEOUT CASE
|
||||||
if ping_status < 0:
|
if ping_status < 0:
|
||||||
message = 'Ping with OAI UE crashed due to TIMEOUT!'
|
message = 'Ping with OAI UE crashed due to TIMEOUT!'
|
||||||
@@ -1285,6 +1285,14 @@ class SSHConnection():
|
|||||||
self.CreateHtmlTestRowQueue(self.ping_args, 'OK', len(self.UEDevices), html_queue)
|
self.CreateHtmlTestRowQueue(self.ping_args, 'OK', len(self.UEDevices), html_queue)
|
||||||
else:
|
else:
|
||||||
self.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue)
|
self.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue)
|
||||||
|
|
||||||
|
# copying on the EPC server for logCollection
|
||||||
|
if ping_from_eNB is not None:
|
||||||
|
copyin_res = self.copyin(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, self.eNBSourceCodePath + '/cmake_targets/ping_' + self.testCase_id + '.log', '.')
|
||||||
|
else:
|
||||||
|
copyin_res = self.copyin(self.UEIPAddress, self.UEUserName, self.UEPassword, self.UESourceCodePath + '/cmake_targets/ping_' + self.testCase_id + '.log', '.')
|
||||||
|
if (copyin_res == 0):
|
||||||
|
self.copyout(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, 'ping_' + self.testCase_id + '.log', self.EPCSourceCodePath + '/scripts')
|
||||||
except:
|
except:
|
||||||
os.kill(os.getppid(),signal.SIGUSR1)
|
os.kill(os.getppid(),signal.SIGUSR1)
|
||||||
|
|
||||||
@@ -1659,7 +1667,7 @@ class SSHConnection():
|
|||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
|
|
||||||
self.command('rm -f iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', 5)
|
self.command('rm -f iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', 5)
|
||||||
iperf_status = self.command('stdbuf -o0 adb -s ' + device_id + ' shell "/data/local/tmp/iperf -c ' + EPC_Iperf_UE_IPAddress + ' ' + modified_options + ' -p ' + str(port) + '" 2>&1 | stdbuf -o0 tee -a iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0)
|
iperf_status = self.command('stdbuf -o0 adb -s ' + device_id + ' shell "/data/local/tmp/iperf -c ' + EPC_Iperf_UE_IPAddress + ' ' + modified_options + ' -p ' + str(port) + '" 2>&1 | stdbuf -o0 tee iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0)
|
||||||
# TIMEOUT Case
|
# TIMEOUT Case
|
||||||
if iperf_status < 0:
|
if iperf_status < 0:
|
||||||
self.close()
|
self.close()
|
||||||
@@ -1739,12 +1747,12 @@ class SSHConnection():
|
|||||||
|
|
||||||
self.command('rm -f iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', 5)
|
self.command('rm -f iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', 5)
|
||||||
if (useIperf3):
|
if (useIperf3):
|
||||||
self.command('stdbuf -o0 iperf3 -c ' + UE_IPAddress + ' ' + modified_options + ' 2>&1 | stdbuf -o0 tee -a iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0)
|
self.command('stdbuf -o0 iperf3 -c ' + UE_IPAddress + ' ' + modified_options + ' 2>&1 | stdbuf -o0 tee iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0)
|
||||||
|
|
||||||
clientStatus = 0
|
clientStatus = 0
|
||||||
self.Iperf_analyzeV3Output(lock, UE_IPAddress, device_id, statusQueue)
|
self.Iperf_analyzeV3Output(lock, UE_IPAddress, device_id, statusQueue)
|
||||||
else:
|
else:
|
||||||
iperf_status = self.command('stdbuf -o0 iperf -c ' + UE_IPAddress + ' ' + modified_options + ' 2>&1 | stdbuf -o0 tee -a iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0)
|
iperf_status = self.command('stdbuf -o0 iperf -c ' + UE_IPAddress + ' ' + modified_options + ' 2>&1 | stdbuf -o0 tee iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0)
|
||||||
if iperf_status < 0:
|
if iperf_status < 0:
|
||||||
self.close()
|
self.close()
|
||||||
message = 'iperf on UE (' + str(UE_IPAddress) + ') crashed due to TIMEOUT !'
|
message = 'iperf on UE (' + str(UE_IPAddress) + ') crashed due to TIMEOUT !'
|
||||||
@@ -1799,6 +1807,7 @@ class SSHConnection():
|
|||||||
iClientPasswd = self.eNBPassword
|
iClientPasswd = self.eNBPassword
|
||||||
# Starting the iperf server
|
# Starting the iperf server
|
||||||
self.open(iServerIPAddr, iServerUser, iServerPasswd)
|
self.open(iServerIPAddr, iServerUser, iServerPasswd)
|
||||||
|
self.command('rm -f /tmp/tmp_iperf_server_' + self.testCase_id + '.log', '\$', 5)
|
||||||
self.command('echo $USER; nohup iperf -u -s -i 1 > /tmp/tmp_iperf_server_' + self.testCase_id + '.log 2>&1 &', iServerUser, 5)
|
self.command('echo $USER; nohup iperf -u -s -i 1 > /tmp/tmp_iperf_server_' + self.testCase_id + '.log 2>&1 &', iServerUser, 5)
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
self.close()
|
self.close()
|
||||||
@@ -1808,7 +1817,8 @@ class SSHConnection():
|
|||||||
modified_options = modified_options.replace('-R','')
|
modified_options = modified_options.replace('-R','')
|
||||||
iperf_time = self.Iperf_ComputeTime()
|
iperf_time = self.Iperf_ComputeTime()
|
||||||
self.open(iClientIPAddr, iClientUser, iClientPasswd)
|
self.open(iClientIPAddr, iClientUser, iClientPasswd)
|
||||||
iperf_status = self.command('stdbuf -o0 iperf ' + modified_options + ' 2>&1 | stdbuf -o0 tee -a /tmp/tmp_iperf_' + self.testCase_id + '.log', '\$', int(iperf_time)*5.0)
|
self.command('rm -f /tmp/tmp_iperf_' + self.testCase_id + '.log', '\$', 5)
|
||||||
|
iperf_status = self.command('stdbuf -o0 iperf ' + modified_options + ' 2>&1 | stdbuf -o0 tee /tmp/tmp_iperf_' + self.testCase_id + '.log', '\$', int(iperf_time)*5.0)
|
||||||
status_queue = SimpleQueue()
|
status_queue = SimpleQueue()
|
||||||
lock = Lock()
|
lock = Lock()
|
||||||
if iperf_status < 0:
|
if iperf_status < 0:
|
||||||
@@ -1830,6 +1840,13 @@ class SSHConnection():
|
|||||||
self.copyin(iServerIPAddr, iServerUser, iServerPasswd, '/tmp/tmp_iperf_server_' + self.testCase_id + '.log', 'iperf_server_' + self.testCase_id + '_OAI-UE.log')
|
self.copyin(iServerIPAddr, iServerUser, iServerPasswd, '/tmp/tmp_iperf_server_' + self.testCase_id + '.log', 'iperf_server_' + self.testCase_id + '_OAI-UE.log')
|
||||||
self.Iperf_analyzeV2Server(lock, '10.0.1.2', 'OAI-UE', status_queue, modified_options)
|
self.Iperf_analyzeV2Server(lock, '10.0.1.2', 'OAI-UE', status_queue, modified_options)
|
||||||
|
|
||||||
|
# copying on the EPC server for logCollection
|
||||||
|
copyin_res = self.copyin(iServerIPAddr, iServerUser, iServerPasswd, '/tmp/tmp_iperf_server_' + self.testCase_id + '.log', 'iperf_server_' + self.testCase_id + '_OAI-UE.log')
|
||||||
|
if (copyin_res == 0):
|
||||||
|
self.copyout(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, 'iperf_server_' + self.testCase_id + '_OAI-UE.log', self.EPCSourceCodePath + '/scripts')
|
||||||
|
copyin_res = self.copyin(iClientIPAddr, iClientUser, iClientPasswd, '/tmp/tmp_iperf_' + self.testCase_id + '.log', 'iperf_' + self.testCase_id + '_OAI-UE.log')
|
||||||
|
if (copyin_res == 0):
|
||||||
|
self.copyout(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, 'iperf_' + self.testCase_id + '_OAI-UE.log', self.EPCSourceCodePath + '/scripts')
|
||||||
iperf_noperf = False
|
iperf_noperf = False
|
||||||
if status_queue.empty():
|
if status_queue.empty():
|
||||||
iperf_status = False
|
iperf_status = False
|
||||||
@@ -2240,7 +2257,7 @@ class SSHConnection():
|
|||||||
result = re.search('Exiting OAI softmodem', str(line))
|
result = re.search('Exiting OAI softmodem', str(line))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
exitSignalReceived = True
|
exitSignalReceived = True
|
||||||
result = re.search('[Ss]egmentation [Ff]ault|======= Backtrace: =========|======= Memory map: ========', str(line))
|
result = re.search('System error|[Ss]egmentation [Ff]ault|======= Backtrace: =========|======= Memory map: ========', str(line))
|
||||||
if result is not None and not exitSignalReceived:
|
if result is not None and not exitSignalReceived:
|
||||||
foundSegFault = True
|
foundSegFault = True
|
||||||
result = re.search('[Cc]ore [dD]ump', str(line))
|
result = re.search('[Cc]ore [dD]ump', str(line))
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<htmlTabName>Test-05MHz-TM1</htmlTabName>
|
<htmlTabName>Test-05MHz-TM1</htmlTabName>
|
||||||
<htmlTabIcon>tasks</htmlTabIcon>
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
<TestCaseRequestedList>
|
<TestCaseRequestedList>
|
||||||
030101 000001 090101 000002 040501 040502 000001 040601 040641 000001 040602 040642 000001 090109 030201
|
030101 000001 090101 000002 040501 040502 000001 040601 040641 000001 090109 030201
|
||||||
</TestCaseRequestedList>
|
</TestCaseRequestedList>
|
||||||
<TestCaseExclusionList></TestCaseExclusionList>
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
@@ -86,63 +86,31 @@
|
|||||||
<testCase id="040601">
|
<testCase id="040601">
|
||||||
<class>Iperf</class>
|
<class>Iperf</class>
|
||||||
<desc>iperf (5MHz - DL/1Mbps/UDP)(30 sec)</desc>
|
<desc>iperf (5MHz - DL/1Mbps/UDP)(30 sec)</desc>
|
||||||
<iperf_args>-u -b 1M -t 30 -i 1 -c 10.0.1.2</iperf_args>
|
<iperf_args>-c 10.0.1.2 -fm -u -b 1M -t 30 -i 1</iperf_args>
|
||||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="040602">
|
<testCase id="040602">
|
||||||
<class>Iperf</class>
|
<class>Iperf</class>
|
||||||
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)</desc>
|
<desc>iperf (5MHz - DL/1.2Mbps/UDP)(30 sec)</desc>
|
||||||
<iperf_args>-u -b 15M -t 30 -i 1 -c 10.0.1.2</iperf_args>
|
<iperf_args>-c 10.0.1.2 -fm -u -b 1.2M -t 30 -i 1</iperf_args>
|
||||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="040606">
|
|
||||||
<class>Iperf</class>
|
|
||||||
<desc>iperf (5MHz - DL/TCP)(30 sec)(single-ue profile)</desc>
|
|
||||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
|
||||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
|
||||||
<iperf_profile>single-ue</iperf_profile>
|
|
||||||
</testCase>
|
|
||||||
|
|
||||||
<testCase id="040607">
|
|
||||||
<class>Iperf</class>
|
|
||||||
<desc>iperf (5MHz - DL/TCP)(30 sec)(balanced profile)</desc>
|
|
||||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
|
||||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
|
||||||
<iperf_profile>balanced</iperf_profile>
|
|
||||||
</testCase>
|
|
||||||
|
|
||||||
<testCase id="040641">
|
<testCase id="040641">
|
||||||
<class>Iperf</class>
|
<class>Iperf</class>
|
||||||
<desc>iperf (5MHz - UL/1Mbps/UDP)(30 sec)</desc>
|
<desc>iperf (5MHz - UL/1Mbps/UDP)(30 sec)</desc>
|
||||||
<iperf_args>-u -b 1M -t 30 -i 1 -R -c 10.0.1.1</iperf_args>
|
<iperf_args>-c 10.0.1.1 -fm -u -b 1M -t 30 -i 1 -R</iperf_args>
|
||||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
<iperf_profile>balanced</iperf_profile>
|
<iperf_profile>balanced</iperf_profile>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="040642">
|
<testCase id="040642">
|
||||||
<class>Iperf</class>
|
<class>Iperf</class>
|
||||||
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)</desc>
|
<desc>iperf (5MHz - UL/1.2Mbps/UDP)(30 sec)</desc>
|
||||||
<iperf_args>-u -b 9M -t 30 -i 1 -R -c 10.0.1.1</iperf_args>
|
<iperf_args>-c 10.0.1.1 -fm -u -b 1.2M -t 30 -i 1</iperf_args>
|
||||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
<iperf_profile>balanced</iperf_profile>
|
<iperf_profile>balanced</iperf_profile>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="040643">
|
|
||||||
<class>Iperf</class>
|
|
||||||
<desc>iperf (5MHz - UL/TCP)(30 sec)(single-ue profile)</desc>
|
|
||||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
|
||||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
|
||||||
<iperf_profile>single-ue</iperf_profile>
|
|
||||||
</testCase>
|
|
||||||
|
|
||||||
<testCase id="040644">
|
|
||||||
<class>Iperf</class>
|
|
||||||
<desc>iperf (5MHz - UL/TCP)(30 sec)(balanced profile)</desc>
|
|
||||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
|
||||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
|
||||||
<iperf_profile>balanced</iperf_profile>
|
|
||||||
</testCase>
|
|
||||||
|
|
||||||
</testCaseList>
|
</testCaseList>
|
||||||
|
|||||||
Reference in New Issue
Block a user