Commit 23a804ec authored by Raphael Defosseux's avatar Raphael Defosseux

Merge branch 'ci-repeat-scenario' into 'develop'

CI: adding support to repeat scenario in case of failure.

See merge request oai/openairinterface5g!645
parents 2d6d1dd9 65002b7f
...@@ -87,6 +87,7 @@ logging.basicConfig( ...@@ -87,6 +87,7 @@ logging.basicConfig(
#----------------------------------------------------------- #-----------------------------------------------------------
class SSHConnection(): class SSHConnection():
def __init__(self): def __init__(self):
self.prematureExit = False
self.ranRepository = '' self.ranRepository = ''
self.ranBranch = '' self.ranBranch = ''
self.ranAllowMerge = False self.ranAllowMerge = False
...@@ -146,6 +147,7 @@ class SSHConnection(): ...@@ -146,6 +147,7 @@ class SSHConnection():
self.htmlTabRefs = [] self.htmlTabRefs = []
self.htmlTabNames = [] self.htmlTabNames = []
self.htmlTabIcons = [] self.htmlTabIcons = []
self.repeatCounts = []
self.finalStatus = False self.finalStatus = False
self.OsVersion = '' self.OsVersion = ''
self.KernelVersion = '' self.KernelVersion = ''
...@@ -745,7 +747,6 @@ class SSHConnection(): ...@@ -745,7 +747,6 @@ class SSHConnection():
doLoop = False doLoop = False
logging.error('\u001B[1;37;41m eNB logging system did not show got sync! \u001B[0m') logging.error('\u001B[1;37;41m eNB logging system did not show got sync! \u001B[0m')
self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'KO', ALL_PROCESSES_OK) self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'KO', ALL_PROCESSES_OK)
self.CreateHtmlTabFooter(False)
# In case of T tracer recording, we need to kill tshark on EPC side # In case of T tracer recording, we need to kill tshark on EPC side
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:
...@@ -761,7 +762,8 @@ class SSHConnection(): ...@@ -761,7 +762,8 @@ class SSHConnection():
copyin_res = self.copyin(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, '/tmp/' + self.EPC_PcapFileName, '.') copyin_res = self.copyin(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, '/tmp/' + self.EPC_PcapFileName, '.')
if (copyin_res == 0): if (copyin_res == 0):
self.copyout(lIpAddr, lUserName, lPassWord, self.EPC_PcapFileName, lSourcePath + '/cmake_targets/.') self.copyout(lIpAddr, lUserName, lPassWord, self.EPC_PcapFileName, lSourcePath + '/cmake_targets/.')
sys.exit(1) self.prematureExit = True
return
else: else:
self.command('stdbuf -o0 cat enb_' + self.testCase_id + '.log | egrep --text --color=never -i "wait|sync|Starting"', '\$', 4) self.command('stdbuf -o0 cat enb_' + self.testCase_id + '.log | egrep --text --color=never -i "wait|sync|Starting"', '\$', 4)
if rruCheck: if rruCheck:
...@@ -938,8 +940,6 @@ class SSHConnection(): ...@@ -938,8 +940,6 @@ class SSHConnection():
self.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'KO', OAI_UE_PROCESS_NO_TUNNEL_INTERFACE, 'OAI UE') self.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'KO', OAI_UE_PROCESS_NO_TUNNEL_INTERFACE, 'OAI UE')
logging.error('\033[91mInitialize OAI UE Failed! \033[0m') logging.error('\033[91mInitialize OAI UE Failed! \033[0m')
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False)
sys.exit(1)
def checkDevTTYisUnlocked(self): def checkDevTTYisUnlocked(self):
self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword) self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword)
...@@ -1090,8 +1090,8 @@ class SSHConnection(): ...@@ -1090,8 +1090,8 @@ class SSHConnection():
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE) pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE)
if (pStatus < 0): if (pStatus < 0):
self.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) self.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
self.CreateHtmlTabFooter(False) self.prematureExit = True
sys.exit(1) return
try: try:
statusQueue = SimpleQueue() statusQueue = SimpleQueue()
lock = Lock() lock = Lock()
...@@ -1173,8 +1173,6 @@ class SSHConnection(): ...@@ -1173,8 +1173,6 @@ class SSHConnection():
else: else:
self.CreateHtmlTestRowQueue(self.ping_args, 'KO', 1, statusQueue) self.CreateHtmlTestRowQueue(self.ping_args, 'KO', 1, statusQueue)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False)
sys.exit(1)
except: except:
os.kill(os.getppid(),signal.SIGUSR1) os.kill(os.getppid(),signal.SIGUSR1)
...@@ -1235,8 +1233,7 @@ class SSHConnection(): ...@@ -1235,8 +1233,7 @@ class SSHConnection():
if (pStatus < 0): if (pStatus < 0):
self.CreateHtmlTestRow('N/A', 'KO', pStatus) self.CreateHtmlTestRow('N/A', 'KO', pStatus)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False) return
sys.exit(1)
multi_jobs = [] multi_jobs = []
status_queue = SimpleQueue() status_queue = SimpleQueue()
lock = Lock() lock = Lock()
...@@ -1254,9 +1251,8 @@ class SSHConnection(): ...@@ -1254,9 +1251,8 @@ class SSHConnection():
if (status_queue.empty()): if (status_queue.empty()):
self.CreateHtmlTestRow('N/A', 'KO', ALL_PROCESSES_OK) self.CreateHtmlTestRow('N/A', 'KO', ALL_PROCESSES_OK)
self.CreateHtmlTabFooter(False)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
sys.exit(1) return
else: else:
attach_status = True attach_status = True
html_queue = SimpleQueue() html_queue = SimpleQueue()
...@@ -1285,8 +1281,6 @@ class SSHConnection(): ...@@ -1285,8 +1281,6 @@ class SSHConnection():
else: else:
self.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue) self.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False)
sys.exit(1)
def DetachUE_common(self, device_id): def DetachUE_common(self, device_id):
try: try:
...@@ -1307,8 +1301,7 @@ class SSHConnection(): ...@@ -1307,8 +1301,7 @@ class SSHConnection():
if (pStatus < 0): if (pStatus < 0):
self.CreateHtmlTestRow('N/A', 'KO', pStatus) self.CreateHtmlTestRow('N/A', 'KO', pStatus)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False) return
sys.exit(1)
multi_jobs = [] multi_jobs = []
cnt = 0 cnt = 0
for device_id in self.UEDevices: for device_id in self.UEDevices:
...@@ -1560,8 +1553,6 @@ class SSHConnection(): ...@@ -1560,8 +1553,6 @@ class SSHConnection():
if (status_queue.empty()): if (status_queue.empty()):
self.CreateHtmlTestRow(htmlOptions, 'KO', ALL_PROCESSES_OK) self.CreateHtmlTestRow(htmlOptions, 'KO', ALL_PROCESSES_OK)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False)
sys.exit(1)
else: else:
check_status = True check_status = True
html_queue = SimpleQueue() html_queue = SimpleQueue()
...@@ -1578,8 +1569,6 @@ class SSHConnection(): ...@@ -1578,8 +1569,6 @@ class SSHConnection():
else: else:
self.CreateHtmlTestRowQueue(htmlOptions, 'KO', len(self.UEDevices), html_queue) self.CreateHtmlTestRowQueue(htmlOptions, 'KO', len(self.UEDevices), html_queue)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False)
sys.exit(1)
def GetAllUEIPAddresses(self): def GetAllUEIPAddresses(self):
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
...@@ -1725,8 +1714,7 @@ class SSHConnection(): ...@@ -1725,8 +1714,7 @@ class SSHConnection():
if (pStatus < 0): if (pStatus < 0):
self.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) self.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False) return
sys.exit(1)
ping_from_eNB = re.search('oaitun_enb1', str(self.ping_args)) ping_from_eNB = re.search('oaitun_enb1', str(self.ping_args))
if ping_from_eNB is not None: if ping_from_eNB is not None:
if self.eNBIPAddress == '' or self.eNBUserName == '' or self.eNBPassword == '': if self.eNBIPAddress == '' or self.eNBUserName == '' or self.eNBPassword == '':
...@@ -1829,14 +1817,12 @@ class SSHConnection(): ...@@ -1829,14 +1817,12 @@ class SSHConnection():
if (pStatus < 0): if (pStatus < 0):
self.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) self.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False) return
sys.exit(1)
ueIpStatus = self.GetAllUEIPAddresses() ueIpStatus = self.GetAllUEIPAddresses()
if (ueIpStatus < 0): if (ueIpStatus < 0):
self.CreateHtmlTestRow(self.ping_args, 'KO', UE_IP_ADDRESS_ISSUE) self.CreateHtmlTestRow(self.ping_args, 'KO', UE_IP_ADDRESS_ISSUE)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False) return
sys.exit(1)
multi_jobs = [] multi_jobs = []
i = 0 i = 0
lock = Lock() lock = Lock()
...@@ -1854,8 +1840,6 @@ class SSHConnection(): ...@@ -1854,8 +1840,6 @@ class SSHConnection():
if (status_queue.empty()): if (status_queue.empty()):
self.CreateHtmlTestRow(self.ping_args, 'KO', ALL_PROCESSES_OK) self.CreateHtmlTestRow(self.ping_args, 'KO', ALL_PROCESSES_OK)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False)
sys.exit(1)
else: else:
ping_status = True ping_status = True
html_queue = SimpleQueue() html_queue = SimpleQueue()
...@@ -1873,8 +1857,6 @@ class SSHConnection(): ...@@ -1873,8 +1857,6 @@ class SSHConnection():
else: else:
self.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue) self.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False)
sys.exit(1)
def Iperf_ComputeTime(self): def Iperf_ComputeTime(self):
result = re.search('-t (?P<iperf_time>\d+)', str(self.iperf_args)) result = re.search('-t (?P<iperf_time>\d+)', str(self.iperf_args))
...@@ -2352,8 +2334,6 @@ class SSHConnection(): ...@@ -2352,8 +2334,6 @@ class SSHConnection():
if (pStatus < 0): if (pStatus < 0):
self.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus) self.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False)
sys.exit(1)
if self.eNBIPAddress == '' or self.eNBUserName == '' or self.eNBPassword == '' or self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '': if self.eNBIPAddress == '' or self.eNBUserName == '' or self.eNBPassword == '' or self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '':
Usage() Usage()
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
...@@ -2443,8 +2423,6 @@ class SSHConnection(): ...@@ -2443,8 +2423,6 @@ class SSHConnection():
else: else:
self.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue) self.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False)
sys.exit(1)
def Iperf(self): def Iperf(self):
result = re.search('noS1', str(self.Initialize_eNB_args)) result = re.search('noS1', str(self.Initialize_eNB_args))
...@@ -2463,14 +2441,12 @@ class SSHConnection(): ...@@ -2463,14 +2441,12 @@ class SSHConnection():
if (pStatus < 0): if (pStatus < 0):
self.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus) self.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False) return
sys.exit(1)
ueIpStatus = self.GetAllUEIPAddresses() ueIpStatus = self.GetAllUEIPAddresses()
if (ueIpStatus < 0): if (ueIpStatus < 0):
self.CreateHtmlTestRow(self.iperf_args, 'KO', UE_IP_ADDRESS_ISSUE) self.CreateHtmlTestRow(self.iperf_args, 'KO', UE_IP_ADDRESS_ISSUE)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False) return
sys.exit(1)
multi_jobs = [] multi_jobs = []
i = 0 i = 0
ue_num = len(self.UEIPAddresses) ue_num = len(self.UEIPAddresses)
...@@ -2489,8 +2465,6 @@ class SSHConnection(): ...@@ -2489,8 +2465,6 @@ class SSHConnection():
if (status_queue.empty()): if (status_queue.empty()):
self.CreateHtmlTestRow(self.iperf_args, 'KO', ALL_PROCESSES_OK) self.CreateHtmlTestRow(self.iperf_args, 'KO', ALL_PROCESSES_OK)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False)
sys.exit(1)
else: else:
iperf_status = True iperf_status = True
iperf_noperf = False iperf_noperf = False
...@@ -2513,8 +2487,6 @@ class SSHConnection(): ...@@ -2513,8 +2487,6 @@ class SSHConnection():
else: else:
self.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue) self.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue)
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False)
sys.exit(1)
def CheckProcessExist(self, check_eNB, check_OAI_UE): def CheckProcessExist(self, check_eNB, check_OAI_UE):
multi_jobs = [] multi_jobs = []
...@@ -2834,10 +2806,17 @@ class SSHConnection(): ...@@ -2834,10 +2806,17 @@ class SSHConnection():
rrcMsg = ' -- ' + str(rrcReestablishReject) + ' were rejected' rrcMsg = ' -- ' + str(rrcReestablishReject) + ' were rejected'
logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m') logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m')
self.htmleNBFailureMsg += rrcMsg + '\n' self.htmleNBFailureMsg += rrcMsg + '\n'
if cdrxActivationMessageCount > 0: if self.eNBOptions[int(self.eNB_instance)] != '':
rrcMsg = 'eNB activated the CDRX Configuration for ' + str(cdrxActivationMessageCount) + ' time(s)' res1 = re.search('drx_Config_present prSetup', self.eNBOptions[int(self.eNB_instance)])
logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m') if res1 is not None:
self.htmleNBFailureMsg += rrcMsg + '\n' if cdrxActivationMessageCount > 0:
rrcMsg = 'eNB activated the CDRX Configuration for ' + str(cdrxActivationMessageCount) + ' time(s)'
logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m')
self.htmleNBFailureMsg += rrcMsg + '\n'
else:
rrcMsg = 'eNB did NOT ACTIVATE the CDRX Configuration'
logging.debug('\u001B[1;37;43m ' + rrcMsg + ' \u001B[0m')
self.htmleNBFailureMsg += rrcMsg + '\n'
if rachCanceledProcedure > 0: if rachCanceledProcedure > 0:
rachMsg = 'eNB cancelled ' + str(rachCanceledProcedure) + ' RA procedure(s)' rachMsg = 'eNB cancelled ' + str(rachCanceledProcedure) + ' RA procedure(s)'
logging.debug('\u001B[1;30;43m ' + rachMsg + ' \u001B[0m') logging.debug('\u001B[1;30;43m ' + rachMsg + ' \u001B[0m')
...@@ -2852,6 +2831,7 @@ class SSHConnection(): ...@@ -2852,6 +2831,7 @@ class SSHConnection():
rruMsg = 'Slave RRU DID NOT receive the RRU_frame_resynch command from RAU' rruMsg = 'Slave RRU DID NOT receive the RRU_frame_resynch command from RAU'
logging.debug('\u001B[1;37;41m ' + rruMsg + ' \u001B[0m') logging.debug('\u001B[1;37;41m ' + rruMsg + ' \u001B[0m')
self.htmleNBFailureMsg += rruMsg + '\n' self.htmleNBFailureMsg += rruMsg + '\n'
self.prematureExit = True
return ENB_PROCESS_SLAVE_RRU_NOT_SYNCED return ENB_PROCESS_SLAVE_RRU_NOT_SYNCED
if foundSegFault: if foundSegFault:
logging.debug('\u001B[1;37;41m eNB ended with a Segmentation Fault! \u001B[0m') logging.debug('\u001B[1;37;41m eNB ended with a Segmentation Fault! \u001B[0m')
...@@ -3121,8 +3101,8 @@ class SSHConnection(): ...@@ -3121,8 +3101,8 @@ class SSHConnection():
logStatus = self.AnalyzeLogFile_eNB(fileToAnalyze) logStatus = self.AnalyzeLogFile_eNB(fileToAnalyze)
if (logStatus < 0): if (logStatus < 0):
self.CreateHtmlTestRow('N/A', 'KO', logStatus) self.CreateHtmlTestRow('N/A', 'KO', logStatus)
self.CreateHtmlTabFooter(False) self.preamtureExit = True
sys.exit(1) return
else: else:
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
else: else:
...@@ -3261,8 +3241,6 @@ class SSHConnection(): ...@@ -3261,8 +3241,6 @@ class SSHConnection():
if (logStatus != OAI_UE_PROCESS_COULD_NOT_SYNC) or (ueAction != 'Sniffing'): if (logStatus != OAI_UE_PROCESS_COULD_NOT_SYNC) or (ueAction != 'Sniffing'):
self.Initialize_OAI_UE_args = '' self.Initialize_OAI_UE_args = ''
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
self.CreateHtmlTabFooter(False)
sys.exit(1)
else: else:
logging.debug('\u001B[1m' + ueAction + ' Completed \u001B[0m') logging.debug('\u001B[1m' + ueAction + ' Completed \u001B[0m')
self.htmlUEFailureMsg = '<b>' + ueAction + ' Completed</b>\n' + self.htmlUEFailureMsg self.htmlUEFailureMsg = '<b>' + ueAction + ' Completed</b>\n' + self.htmlUEFailureMsg
...@@ -3288,6 +3266,7 @@ class SSHConnection(): ...@@ -3288,6 +3266,7 @@ class SSHConnection():
self.ShowTestID() self.ShowTestID()
self.eNB_instance = '0' self.eNB_instance = '0'
self.TerminateeNB() self.TerminateeNB()
self.prematureExit = True
def IdleSleep(self): def IdleSleep(self):
time.sleep(self.idle_sleep_time) time.sleep(self.idle_sleep_time)
...@@ -3548,6 +3527,7 @@ class SSHConnection(): ...@@ -3548,6 +3527,7 @@ class SSHConnection():
pillMsg = ' <li><a data-toggle="pill" href="#' pillMsg = ' <li><a data-toggle="pill" href="#'
pillMsg += self.htmlTabRefs[count] pillMsg += self.htmlTabRefs[count]
pillMsg += '">' pillMsg += '">'
pillMsg += '__STATE_' + self.htmlTabNames[count] + '__'
pillMsg += self.htmlTabNames[count] pillMsg += self.htmlTabNames[count]
pillMsg += ' <span class="glyphicon glyphicon-' pillMsg += ' <span class="glyphicon glyphicon-'
pillMsg += self.htmlTabIcons[count] pillMsg += self.htmlTabIcons[count]
...@@ -3601,6 +3581,14 @@ class SSHConnection(): ...@@ -3601,6 +3581,14 @@ class SSHConnection():
self.htmlFile.write(' </tr>\n') self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' </table>\n') self.htmlFile.write(' </table>\n')
self.htmlFile.write(' </div>\n') self.htmlFile.write(' </div>\n')
self.htmlFile.close()
time.sleep(1)
if passStatus:
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__//' test_results.html"
subprocess.run(cmd, shell=True)
else:
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-remove\"><\/span>/' test_results.html"
subprocess.run(cmd, shell=True)
self.htmlFooterCreated = False self.htmlFooterCreated = False
def CreateHtmlFooter(self, passStatus): def CreateHtmlFooter(self, passStatus):
...@@ -4178,6 +4166,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -4178,6 +4166,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
requested_tests=xmlRoot.findtext('TestCaseRequestedList',default='') requested_tests=xmlRoot.findtext('TestCaseRequestedList',default='')
if (SSH.nbTestXMLfiles == 1): if (SSH.nbTestXMLfiles == 1):
SSH.htmlTabRefs.append(xmlRoot.findtext('htmlTabRef',default='test-tab-0')) SSH.htmlTabRefs.append(xmlRoot.findtext('htmlTabRef',default='test-tab-0'))
SSH.htmlTabNames.append(xmlRoot.findtext('htmlTabName',default='Test-0'))
repeatCount = xmlRoot.findtext('repeatCount',default='1')
SSH.repeatCounts.append(int(repeatCount))
all_tests=xmlRoot.findall('testCase') all_tests=xmlRoot.findall('testCase')
exclusion_tests=exclusion_tests.split() exclusion_tests=exclusion_tests.split()
...@@ -4219,88 +4210,102 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -4219,88 +4210,102 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
SSH.CreateHtmlTabHeader() SSH.CreateHtmlTabHeader()
for test_case_id in todo_tests: cnt = 0
for test in all_tests: SSH.prematureExit = True
id = test.get('id') while cnt < SSH.repeatCounts[0] and SSH.prematureExit:
if test_case_id != id: SSH.prematureExit = False
continue for test_case_id in todo_tests:
SSH.testCase_id = id for test in all_tests:
SSH.desc = test.findtext('desc') id = test.get('id')
action = test.findtext('class') if test_case_id != id:
if (CheckClassValidity(action, id) == False): continue
continue SSH.testCase_id = id
SSH.ShowTestID() SSH.desc = test.findtext('desc')
GetParametersFromXML(action) action = test.findtext('class')
if action == 'Initialize_UE' or action == 'Attach_UE' or action == 'Detach_UE' or action == 'Ping' or action == 'Iperf' or action == 'Reboot_UE' or action == 'DataDisable_UE' or action == 'DataEnable_UE' or action == 'CheckStatusUE': if (CheckClassValidity(action, id) == False):
if (SSH.ADBIPAddress != 'none'): continue
terminate_ue_flag = False SSH.ShowTestID()
SSH.GetAllUEDevices(terminate_ue_flag) GetParametersFromXML(action)
if action == 'Build_eNB': if action == 'Initialize_UE' or action == 'Attach_UE' or action == 'Detach_UE' or action == 'Ping' or action == 'Iperf' or action == 'Reboot_UE' or action == 'DataDisable_UE' or action == 'DataEnable_UE' or action == 'CheckStatusUE':
SSH.BuildeNB() if (SSH.ADBIPAddress != 'none'):
elif action == 'WaitEndBuild_eNB': terminate_ue_flag = False
SSH.WaitBuildeNBisFinished() SSH.GetAllUEDevices(terminate_ue_flag)
elif action == 'Initialize_eNB': if action == 'Build_eNB':
SSH.InitializeeNB() SSH.BuildeNB()
elif action == 'Terminate_eNB': elif action == 'WaitEndBuild_eNB':
SSH.TerminateeNB() SSH.WaitBuildeNBisFinished()
elif action == 'Initialize_UE': elif action == 'Initialize_eNB':
SSH.InitializeUE() SSH.InitializeeNB()
elif action == 'Terminate_UE': elif action == 'Terminate_eNB':
SSH.TerminateUE() SSH.TerminateeNB()
elif action == 'Attach_UE': elif action == 'Initialize_UE':
SSH.AttachUE() SSH.InitializeUE()
elif action == 'Detach_UE': elif action == 'Terminate_UE':
SSH.DetachUE() SSH.TerminateUE()
elif action == 'DataDisable_UE': elif action == 'Attach_UE':
SSH.DataDisableUE() SSH.AttachUE()
elif action == 'DataEnable_UE': elif action == 'Detach_UE':
SSH.DataEnableUE() SSH.DetachUE()
elif action == 'CheckStatusUE': elif action == 'DataDisable_UE':
SSH.CheckStatusUE() SSH.DataDisableUE()
elif action == 'Build_OAI_UE': elif action == 'DataEnable_UE':
SSH.BuildOAIUE() SSH.DataEnableUE()
elif action == 'Initialize_OAI_UE': elif action == 'CheckStatusUE':
SSH.InitializeOAIUE() SSH.CheckStatusUE()
elif action == 'Terminate_OAI_UE': elif action == 'Build_OAI_UE':
SSH.TerminateOAIUE() SSH.BuildOAIUE()
elif action == 'Initialize_CatM_module': elif action == 'Initialize_OAI_UE':
SSH.InitializeCatM() SSH.InitializeOAIUE()
elif action == 'Terminate_CatM_module': elif action == 'Terminate_OAI_UE':
SSH.TerminateCatM() SSH.TerminateOAIUE()
elif action == 'Attach_CatM_module': elif action == 'Initialize_CatM_module':
SSH.AttachCatM() SSH.InitializeCatM()
elif action == 'Detach_CatM_module': elif action == 'Terminate_CatM_module':
SSH.TerminateCatM() SSH.TerminateCatM()
elif action == 'Ping_CatM_module': elif action == 'Attach_CatM_module':
SSH.PingCatM() SSH.AttachCatM()
elif action == 'Ping': elif action == 'Detach_CatM_module':
SSH.Ping() SSH.TerminateCatM()
elif action == 'Iperf': elif action == 'Ping_CatM_module':
SSH.Iperf() SSH.PingCatM()
elif action == 'Reboot_UE': elif action == 'Ping':
SSH.RebootUE() SSH.Ping()
elif action == 'Initialize_HSS': elif action == 'Iperf':
SSH.InitializeHSS() SSH.Iperf()
elif action == 'Terminate_HSS': elif action == 'Reboot_UE':
SSH.TerminateHSS() SSH.RebootUE()
elif action == 'Initialize_MME': elif action == 'Initialize_HSS':
SSH.InitializeMME() SSH.InitializeHSS()
elif action == 'Terminate_MME': elif action == 'Terminate_HSS':
SSH.TerminateMME() SSH.TerminateHSS()
elif action == 'Initialize_SPGW': elif action == 'Initialize_MME':
SSH.InitializeSPGW() SSH.InitializeMME()
elif action == 'Terminate_SPGW': elif action == 'Terminate_MME':
SSH.TerminateSPGW() SSH.TerminateMME()
elif action == 'Initialize_FlexranCtrl': elif action == 'Initialize_SPGW':
SSH.InitializeFlexranCtrl() SSH.InitializeSPGW()
elif action == 'Terminate_FlexranCtrl': elif action == 'Terminate_SPGW':
SSH.TerminateFlexranCtrl() SSH.TerminateSPGW()
elif action == 'IdleSleep': elif action == 'Initialize_FlexranCtrl':
SSH.IdleSleep() SSH.InitializeFlexranCtrl()
else: elif action == 'Terminate_FlexranCtrl':
sys.exit('Invalid action') SSH.TerminateFlexranCtrl()
elif action == 'IdleSleep':
SSH.CreateHtmlTabFooter(True) SSH.IdleSleep()
else:
sys.exit('Invalid action')
if SSH.prematureExit:
break
if SSH.prematureExit:
break
cnt += 1
if cnt == SSH.repeatCounts[0] and SSH.prematureExit:
logging.debug('Testsuite failed ' + str(cnt) + ' time(s)')
SSH.CreateHtmlTabFooter(False)
sys.exit('Failed Scenario')
else:
logging.info('Testsuite passed after ' + str(cnt) + ' time(s)')
SSH.CreateHtmlTabFooter(True)
else: else:
Usage() Usage()
sys.exit('Invalid mode') sys.exit('Invalid mode')
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
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>
...@@ -38,12 +37,6 @@ ...@@ -38,12 +37,6 @@
<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> <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>
<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>
</testCase>
<testCase id="030201"> <testCase id="030201">
<class>Terminate_eNB</class> <class>Terminate_eNB</class>
<desc>Terminate eNB</desc> <desc>Terminate eNB</desc>
...@@ -64,12 +57,6 @@ ...@@ -64,12 +57,6 @@
<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>
...@@ -82,21 +69,6 @@ ...@@ -82,21 +69,6 @@
<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>
...@@ -137,14 +109,6 @@ ...@@ -137,14 +109,6 @@
<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>
......
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>test-10-cdrx-tm1</htmlTabRef>
<htmlTabName>Test-10MHz-CDRX-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>
030201
040101
030112 040302 040512 040612 040650 040401 040201 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<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 --eNBs.[0].component_carriers.[0].drx_Config_present prSetup</Initialize_eNB_args>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="040201">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
</testCase>
<testCase id="040302">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<nbMaxUEtoAttach>1</nbMaxUEtoAttach>
</testCase>
<testCase id="040401">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</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="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>
</testCaseList>
...@@ -22,8 +22,9 @@ ...@@ -22,8 +22,9 @@
--> -->
<testCaseList> <testCaseList>
<htmlTabRef>test-f1-05</htmlTabRef> <htmlTabRef>test-f1-05</htmlTabRef>
<htmlTabName>Test-F1-CU/DU-05MHz</htmlTabName> <htmlTabName>Test-F1-CU-DU-05MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
030201 030201
040101 040101
......
...@@ -22,8 +22,9 @@ ...@@ -22,8 +22,9 @@
--> -->
<testCaseList> <testCaseList>
<htmlTabRef>test-f1-10</htmlTabRef> <htmlTabRef>test-f1-10</htmlTabRef>
<htmlTabName>Test-F1-CU/DU-10MHz</htmlTabName> <htmlTabName>Test-F1-CU-DU-10MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
030201 030201
040101 040101
......
...@@ -22,8 +22,9 @@ ...@@ -22,8 +22,9 @@
--> -->
<testCaseList> <testCaseList>
<htmlTabRef>test-f1-20</htmlTabRef> <htmlTabRef>test-f1-20</htmlTabRef>
<htmlTabName>Test-F1-CU/DU-20MHz</htmlTabName> <htmlTabName>Test-F1-CU-DU-20MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
030201 030201
040101 040101
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<htmlTabRef>test-multi-rru-10</htmlTabRef> <htmlTabRef>test-multi-rru-10</htmlTabRef>
<htmlTabName>Test-Multi-RRU-10MHz</htmlTabName> <htmlTabName>Test-Multi-RRU-10MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
030211 030212 030213 030211 030212 030213
030111 030112 030113 030111 030112 030113
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<htmlTabRef>test-10mhz-orange</htmlTabRef> <htmlTabRef>test-10mhz-orange</htmlTabRef>
<htmlTabName>Test-10Mhz-Orange</htmlTabName> <htmlTabName>Test-10Mhz-Orange</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
090109 090109
090110 000001 090109 090110 000001 090109
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<htmlTabRef>test-10mHz-sfr</htmlTabRef> <htmlTabRef>test-10mHz-sfr</htmlTabRef>
<htmlTabName>Test-10MHz-SFR</htmlTabName> <htmlTabName>Test-10MHz-SFR</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
090109 090109
090111 000001 090109 090111 000001 090109
......
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