[0-9]+)', str(line))
if res1 is not None and res2 is not None:
requested_option = int(res1.group('requested_option'))
applied_option = int(res2.group('applied_option'))
if requested_option == applied_option:
- self.htmleNBFailureMsg += ' Command line option(s) correctly applied ' + self.rruOptions + '\n\n'
+ self.htmleNBFailureMsg += ' Command line option(s) correctly applied ' + self.eNBOptions[int(self.eNB_instance)] + '\n\n'
else:
- self.htmleNBFailureMsg += ' Command line option(s) NOT applied ' + self.rruOptions + '\n\n'
+ self.htmleNBFailureMsg += ' Command line option(s) NOT applied ' + self.eNBOptions[int(self.eNB_instance)] + '\n\n'
result = re.search('Exiting OAI softmodem', str(line))
if result is not None:
exitSignalReceived = True
@@ -2562,6 +2666,17 @@ class SSHConnection():
if foundAssertion and (msgLine < 3):
msgLine += 1
msgAssertion += str(line)
+ result = re.search('Setting function for RU', str(line))
+ if result is not None:
+ isRRU = True
+ if isRRU:
+ result = re.search('RU 0 is_slave=yes', str(line))
+ if result is not None:
+ isSlave = True
+ if isSlave:
+ result = re.search('Received RRU_frame_resynch command', str(line))
+ if result is not None:
+ slaveReceivesFrameResyncCmd = True
result = re.search('LTE_RRCConnectionSetupComplete from UE', str(line))
if result is not None:
rrcSetupComplete += 1
@@ -2655,6 +2770,17 @@ class SSHConnection():
rachMsg = 'eNB cancelled ' + str(rachCanceledProcedure) + ' RA procedure(s)'
logging.debug('\u001B[1;30;43m ' + rachMsg + ' \u001B[0m')
self.htmleNBFailureMsg += rachMsg + '\n'
+ if isRRU:
+ if isSlave:
+ if slaveReceivesFrameResyncCmd:
+ rruMsg = 'Slave RRU received the RRU_frame_resynch command from RAU'
+ logging.debug('\u001B[1;30;43m ' + rruMsg + ' \u001B[0m')
+ self.htmleNBFailureMsg += rruMsg + '\n'
+ else:
+ rruMsg = 'Slave RRU DID NOT receive the RRU_frame_resynch command from RAU'
+ logging.debug('\u001B[1;37;41m ' + rruMsg + ' \u001B[0m')
+ self.htmleNBFailureMsg += rruMsg + '\n'
+ return ENB_PROCESS_SLAVE_RRU_NOT_SYNCED
if foundSegFault:
logging.debug('\u001B[1;37;41m eNB ended with a Segmentation Fault! \u001B[0m')
return ENB_PROCESS_SEG_FAULT
@@ -2842,18 +2968,36 @@ class SSHConnection():
return 0
def TerminateeNB(self):
- self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword)
- self.command('cd ' + self.eNBSourceCodePath + '/cmake_targets', '\$', 5)
+ if self.eNB_serverId == '0':
+ lIpAddr = self.eNBIPAddress
+ lUserName = self.eNBUserName
+ lPassWord = self.eNBPassword
+ lSourcePath = self.eNBSourceCodePath
+ elif self.eNB_serverId == '1':
+ lIpAddr = self.eNB1IPAddress
+ lUserName = self.eNB1UserName
+ lPassWord = self.eNB1Password
+ lSourcePath = self.eNB1SourceCodePath
+ elif self.eNB_serverId == '2':
+ lIpAddr = self.eNB2IPAddress
+ lUserName = self.eNB2UserName
+ lPassWord = self.eNB2Password
+ lSourcePath = self.eNB2SourceCodePath
+ if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
+ Usage()
+ sys.exit('Insufficient Parameter')
+ self.open(lIpAddr, lUserName, lPassWord)
+ self.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
self.command('stdbuf -o0 ps -aux | grep --color=never softmodem | grep -v grep', '\$', 5)
result = re.search('lte-softmodem', str(self.ssh.before))
if result is not None:
- self.command('echo ' + self.eNBPassword + ' | sudo -S daemon --name=enb' + str(self.eNB_instance) + '_daemon --stop', '\$', 5)
- self.command('echo ' + self.eNBPassword + ' | sudo -S killall --signal SIGINT lte-softmodem || true', '\$', 5)
+ self.command('echo ' + lPassWord + ' | sudo -S daemon --name=enb' + str(self.eNB_instance) + '_daemon --stop', '\$', 5)
+ self.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGINT lte-softmodem || true', '\$', 5)
time.sleep(5)
self.command('stdbuf -o0 ps -aux | grep --color=never softmodem | grep -v grep', '\$', 5)
result = re.search('lte-softmodem', str(self.ssh.before))
if result is not None:
- self.command('echo ' + self.eNBPassword + ' | sudo -S killall --signal SIGKILL lte-softmodem || true', '\$', 5)
+ self.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL lte-softmodem || true', '\$', 5)
time.sleep(2)
self.command('rm -f my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
self.close()
@@ -2867,44 +3011,40 @@ class SSHConnection():
if self.EPC_PcapFileName != '':
self.command('echo ' + self.EPCPassword + ' | sudo -S chmod 666 /tmp/' + self.EPC_PcapFileName, '\$', 5)
self.copyin(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, '/tmp/' + self.EPC_PcapFileName, '.')
- self.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, self.EPC_PcapFileName, self.eNBSourceCodePath + '/cmake_targets/.')
+ self.copyout(lIpAddr, lUserName, lPassWord, self.EPC_PcapFileName, lSourcePath + '/cmake_targets/.')
self.close()
logging.debug('\u001B[1m Replaying RAW record file\u001B[0m')
- self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword)
- self.command('cd ' + self.eNBSourceCodePath + '/common/utils/T/tracer/', '\$', 5)
- raw_record_file = self.eNBLogFile.replace('.log', '_record.raw')
- replay_log_file = self.eNBLogFile.replace('.log', '_replay.log')
- extracted_txt_file = self.eNBLogFile.replace('.log', '_extracted_messages.txt')
- extracted_log_file = self.eNBLogFile.replace('.log', '_extracted_messages.log')
- self.command('./extract_config -i ' + self.eNBSourceCodePath + '/cmake_targets/' + raw_record_file + ' > ' + self.eNBSourceCodePath + '/cmake_targets/' + extracted_txt_file, '\$', 5)
- self.command('echo $USER; nohup ./replay -i ' + self.eNBSourceCodePath + '/cmake_targets/' + raw_record_file + ' > ' + self.eNBSourceCodePath + '/cmake_targets/' + replay_log_file + ' 2>&1 &', self.eNBUserName, 5)
- self.command('./textlog -d ' + self.eNBSourceCodePath + '/cmake_targets/' + extracted_txt_file + ' -no-gui -ON -full > ' + self.eNBSourceCodePath + '/cmake_targets/' + extracted_log_file, '\$', 5)
+ self.open(lIpAddr, lUserName, lPassWord)
+ self.command('cd ' + lSourcePath + '/common/utils/T/tracer/', '\$', 5)
+ enbLogFile = self.eNBLogFiles[int(self.eNB_instance)]
+ raw_record_file = enbLogFile.replace('.log', '_record.raw')
+ replay_log_file = enbLogFile.replace('.log', '_replay.log')
+ extracted_txt_file = enbLogFile.replace('.log', '_extracted_messages.txt')
+ extracted_log_file = enbLogFile.replace('.log', '_extracted_messages.log')
+ self.command('./extract_config -i ' + lSourcePath + '/cmake_targets/' + raw_record_file + ' > ' + lSourcePath + '/cmake_targets/' + extracted_txt_file, '\$', 5)
+ self.command('echo $USER; nohup ./replay -i ' + lSourcePath + '/cmake_targets/' + raw_record_file + ' > ' + lSourcePath + '/cmake_targets/' + replay_log_file + ' 2>&1 &', lUserName, 5)
+ self.command('./textlog -d ' + lSourcePath + '/cmake_targets/' + extracted_txt_file + ' -no-gui -ON -full > ' + lSourcePath + '/cmake_targets/' + extracted_log_file, '\$', 5)
self.close()
- self.copyin(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, self.eNBSourceCodePath + '/cmake_targets/' + extracted_log_file, '.')
+ self.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/' + extracted_log_file, '.')
logging.debug('\u001B[1m Analyzing eNB replay logfile \u001B[0m')
logStatus = self.AnalyzeLogFile_eNB(extracted_log_file)
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
- self.eNBLogFile = ''
+ self.eNBLogFiles[int(self.eNB_instance)] = ''
else:
- result = re.search('enb_', str(self.eNBLogFile))
analyzeFile = False
- if result is not None:
+ if self.eNBLogFiles[int(self.eNB_instance)] != '':
analyzeFile = True
- fileToAnalyze = str(self.eNBLogFile)
- self.eNBLogFile = ''
- else:
- result = re.search('enb_', str(self.rruLogFile))
- if result is not None:
- analyzeFile = True
- fileToAnalyze = str(self.rruLogFile)
- self.rruLogFile = ''
+ fileToAnalyze = self.eNBLogFiles[int(self.eNB_instance)]
+ self.eNBLogFiles[int(self.eNB_instance)] = ''
if analyzeFile:
- copyin_res = self.copyin(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, self.eNBSourceCodePath + '/cmake_targets/' + fileToAnalyze, '.')
+ copyin_res = self.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/' + fileToAnalyze, '.')
if (copyin_res == -1):
logging.debug('\u001B[1;37;41m Could not copy eNB logfile to analyze it! \u001B[0m')
self.htmleNBFailureMsg = 'Could not copy eNB logfile to analyze it!'
self.CreateHtmlTestRow('N/A', 'KO', ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
return
+ if self.eNB_serverId != '0':
+ self.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './' + fileToAnalyze, self.eNBSourceCodePath + '/cmake_targets/')
logging.debug('\u001B[1m Analyzing eNB logfile \u001B[0m ' + fileToAnalyze)
logStatus = self.AnalyzeLogFile_eNB(fileToAnalyze)
if (logStatus < 0):
@@ -3276,46 +3416,46 @@ class SSHConnection():
self.htmlFile.write(' \n')
self.htmlFile.write(' \n')
self.htmlFile.write(' | GIT Repository | \n')
- self.htmlFile.write(' ' + self.eNBRepository + ' | \n')
+ self.htmlFile.write(' ' + self.ranRepository + ' | \n')
self.htmlFile.write('
\n')
self.htmlFile.write(' \n')
self.htmlFile.write(' | Job Trigger | \n')
- if (self.eNB_AllowMerge):
+ if (self.ranAllowMerge):
self.htmlFile.write(' Merge-Request | \n')
else:
self.htmlFile.write(' Push to Branch | \n')
self.htmlFile.write('
\n')
self.htmlFile.write(' \n')
- if (self.eNB_AllowMerge):
+ if (self.ranAllowMerge):
self.htmlFile.write(' | Source Branch | \n')
else:
self.htmlFile.write(' Branch | \n')
- self.htmlFile.write(' ' + self.eNBBranch + ' | \n')
+ self.htmlFile.write(' ' + self.ranBranch + ' | \n')
self.htmlFile.write('
\n')
self.htmlFile.write(' \n')
- if (self.eNB_AllowMerge):
+ if (self.ranAllowMerge):
self.htmlFile.write(' | Source Commit ID | \n')
else:
self.htmlFile.write(' Commit ID | \n')
- self.htmlFile.write(' ' + self.eNBCommitID + ' | \n')
+ self.htmlFile.write(' ' + self.ranCommitID + ' | \n')
self.htmlFile.write('
\n')
- if self.eNB_AllowMerge != '':
- commit_message = subprocess.check_output("git log -n1 --pretty=format:\"%s\" " + self.eNBCommitID, shell=True, universal_newlines=True)
+ if self.ranAllowMerge != '':
+ commit_message = subprocess.check_output("git log -n1 --pretty=format:\"%s\" " + self.ranCommitID, shell=True, universal_newlines=True)
commit_message = commit_message.strip()
self.htmlFile.write(' \n')
- if (self.eNB_AllowMerge):
+ if (self.ranAllowMerge):
self.htmlFile.write(' | Source Commit Message | \n')
else:
self.htmlFile.write(' Commit Message | \n')
self.htmlFile.write(' ' + commit_message + ' | \n')
self.htmlFile.write('
\n')
- if (self.eNB_AllowMerge):
+ if (self.ranAllowMerge):
self.htmlFile.write(' \n')
self.htmlFile.write(' | Target Branch | \n')
- if (self.eNBTargetBranch == ''):
+ if (self.ranTargetBranch == ''):
self.htmlFile.write(' develop | \n')
else:
- self.htmlFile.write(' ' + self.eNBTargetBranch + ' | \n')
+ self.htmlFile.write(' ' + self.ranTargetBranch + ' | \n')
self.htmlFile.write('
\n')
self.htmlFile.write(' \n')
@@ -3468,6 +3608,8 @@ class SSHConnection():
self.htmlFile.write(' KO - ' + machine + ' process faced Real Time issue(s) | \n')
elif (processesStatus == ENB_PROCESS_NOLOGFILE_TO_ANALYZE) or (processesStatus == OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE):
self.htmlFile.write(' OK? | \n')
+ elif (processesStatus == ENB_PROCESS_SLAVE_RRU_NOT_SYNCED):
+ self.htmlFile.write(' KO - ' + machine + ' Slave RRU could not synch | \n')
elif (processesStatus == OAI_UE_PROCESS_COULD_NOT_SYNC):
self.htmlFile.write(' KO - UE could not sync | \n')
elif (processesStatus == HSS_PROCESS_FAILED):
@@ -3563,12 +3705,12 @@ def Usage():
print(' InitiateHtml, FinalizeHtml')
print(' TerminateeNB, TerminateUE, TerminateHSS, TerminateMME, TerminateSPGW')
print(' LogCollectBuild, LogCollecteNB, LogCollectHSS, LogCollectMME, LogCollectSPGW, LogCollectPing, LogCollectIperf')
+ print(' --eNBRepository=[eNB\'s Repository URL] or --ranRepository=[OAI RAN Repository URL]')
+ print(' --eNBBranch=[eNB\'s Branch Name] or --ranBranch=[OAI RAN Repository Branch')
+ print(' --eNBCommitID=[eNB\'s Commit Number] or --ranCommitID=[OAI RAN Repository Commit SHA-1')
+ print(' --eNB_AllowMerge=[eNB\'s Allow Merge Request (with target branch)] or --ranAllowMerge=true/false')
+ print(' --eNBTargetBranch=[eNB\'s Target Branch in case of a Merge Request] or --ranTargetBranch=[Target Branch]')
print(' --eNBIPAddress=[eNB\'s IP Address]')
- print(' --eNBRepository=[eNB\'s Repository URL]')
- print(' --eNBBranch=[eNB\'s Branch Name]')
- print(' --eNBCommitID=[eNB\'s Commit Number]')
- print(' --eNB_AllowMerge=[eNB\'s Allow Merge Request (with target branch)]')
- print(' --eNBTargetBranch=[eNB\'s Target Branch in case of a Merge Request]')
print(' --eNBUserName=[eNB\'s Login User Name]')
print(' --eNBPassword=[eNB\'s Login Password]')
print(' --eNBSourceCodePath=[eNB\'s Source Code Path]')
@@ -3584,7 +3726,7 @@ def Usage():
print('------------------------------------------------------------')
def CheckClassValidity(action,id):
- if action != 'Build_eNB' and action != 'Initialize_eNB' and action != 'Terminate_eNB' and action != 'Initialize_UE' and action != 'Terminate_UE' and action != 'Attach_UE' and action != 'Detach_UE' and action != 'Build_OAI_UE' and action != 'Initialize_OAI_UE' and action != 'Terminate_OAI_UE' and action != 'DataDisable_UE' and action != 'DataEnable_UE' and action != 'CheckStatusUE' and action != 'Ping' and action != 'Iperf' and action != 'Reboot_UE' and action != 'Initialize_FlexranCtrl' and action != 'Terminate_FlexranCtrl' and action != 'Initialize_HSS' and action != 'Terminate_HSS' and action != 'Initialize_MME' and action != 'Terminate_MME' and action != 'Initialize_SPGW' and action != 'Terminate_SPGW' and action != 'Initialize_CatM_module' and action != 'Terminate_CatM_module' and action != 'Attach_CatM_module' and action != 'Detach_CatM_module' and action != 'Ping_CatM_module' and action != 'IdleSleep':
+ if action != 'Build_eNB' and action != 'WaitEndBuild_eNB' and action != 'Initialize_eNB' and action != 'Terminate_eNB' and action != 'Initialize_UE' and action != 'Terminate_UE' and action != 'Attach_UE' and action != 'Detach_UE' and action != 'Build_OAI_UE' and action != 'Initialize_OAI_UE' and action != 'Terminate_OAI_UE' and action != 'DataDisable_UE' and action != 'DataEnable_UE' and action != 'CheckStatusUE' and action != 'Ping' and action != 'Iperf' and action != 'Reboot_UE' and action != 'Initialize_FlexranCtrl' and action != 'Terminate_FlexranCtrl' and action != 'Initialize_HSS' and action != 'Terminate_HSS' and action != 'Initialize_MME' and action != 'Terminate_MME' and action != 'Initialize_SPGW' and action != 'Terminate_SPGW' and action != 'Initialize_CatM_module' and action != 'Terminate_CatM_module' and action != 'Attach_CatM_module' and action != 'Detach_CatM_module' and action != 'Ping_CatM_module' and action != 'IdleSleep':
logging.debug('ERROR: test-case ' + id + ' has wrong class ' + action)
return False
return True
@@ -3592,17 +3734,46 @@ def CheckClassValidity(action,id):
def GetParametersFromXML(action):
if action == 'Build_eNB':
SSH.Build_eNB_args = test.findtext('Build_eNB_args')
+ SSH.eNB_instance = test.findtext('eNB_instance')
+ if (SSH.eNB_instance is None):
+ SSH.eNB_instance = '0'
+ SSH.eNB_serverId = test.findtext('eNB_serverId')
+ if (SSH.eNB_serverId is None):
+ SSH.eNB_serverId = '0'
+ xmlBgBuildField = test.findtext('backgroundBuild')
+ if (xmlBgBuildField is None):
+ SSH.backgroundBuild = False
+ else:
+ if re.match('true', xmlBgBuildField, re.IGNORECASE):
+ SSH.backgroundBuild = True
+ else:
+ SSH.backgroundBuild = False
+
+ if action == 'WaitEndBuild_eNB':
+ SSH.Build_eNB_args = test.findtext('Build_eNB_args')
+ SSH.eNB_instance = test.findtext('eNB_instance')
+ if (SSH.eNB_instance is None):
+ SSH.eNB_instance = '0'
+ SSH.eNB_serverId = test.findtext('eNB_serverId')
+ if (SSH.eNB_serverId is None):
+ SSH.eNB_serverId = '0'
if action == 'Initialize_eNB':
SSH.Initialize_eNB_args = test.findtext('Initialize_eNB_args')
SSH.eNB_instance = test.findtext('eNB_instance')
if (SSH.eNB_instance is None):
SSH.eNB_instance = '0'
+ SSH.eNB_serverId = test.findtext('eNB_serverId')
+ if (SSH.eNB_serverId is None):
+ SSH.eNB_serverId = '0'
if action == 'Terminate_eNB':
SSH.eNB_instance = test.findtext('eNB_instance')
if (SSH.eNB_instance is None):
SSH.eNB_instance = '0'
+ SSH.eNB_serverId = test.findtext('eNB_serverId')
+ if (SSH.eNB_serverId is None):
+ SSH.eNB_serverId = '0'
if action == 'Attach_UE':
nbMaxUEtoAttach = test.findtext('nbMaxUEtoAttach')
@@ -3684,35 +3855,78 @@ while len(argvs) > 1:
elif re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE)
mode = matchReg.group(1)
- elif re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
- SSH.eNBIPAddress = matchReg.group(1)
- elif re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE)
- SSH.eNBRepository = matchReg.group(1)
- elif re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
+ elif re.match('^\-\-eNBRepository=(.+)$|^\-\-ranRepository(.+)$', myArgv, re.IGNORECASE):
+ if re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE)
+ else:
+ matchReg = re.match('^\-\-ranRepository=(.+)$', myArgv, re.IGNORECASE)
+ SSH.ranRepository = matchReg.group(1)
+ elif re.match('^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
+ if re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
+ else:
+ matchReg = re.match('^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE)
doMerge = matchReg.group(1)
if ((doMerge == 'true') or (doMerge == 'True')):
- SSH.eNB_AllowMerge = True
- elif re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE)
- SSH.eNBBranch = matchReg.group(1)
- elif re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
- SSH.eNBCommitID = matchReg.group(1)
- elif re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
- SSH.eNBTargetBranch = matchReg.group(1)
- elif re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
- SSH.eNBUserName = matchReg.group(1)
- elif re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE)
- SSH.eNBPassword = matchReg.group(1)
- elif re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
- matchReg = re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
- SSH.eNBSourceCodePath = matchReg.group(1)
+ SSH.ranAllowMerge = True
+ elif re.match('^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE):
+ if re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE)
+ else:
+ matchReg = re.match('^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE)
+ SSH.ranBranch = matchReg.group(1)
+ elif re.match('^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE):
+ if re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
+ else:
+ matchReg = re.match('^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE)
+ SSH.ranCommitID = matchReg.group(1)
+ elif re.match('^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE):
+ if re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
+ else:
+ matchReg = re.match('^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE)
+ SSH.ranTargetBranch = matchReg.group(1)
+ elif re.match('^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
+ if re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
+ SSH.eNBIPAddress = matchReg.group(1)
+ elif re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
+ SSH.eNB1IPAddress = matchReg.group(1)
+ elif re.match('^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE)
+ SSH.eNB2IPAddress = matchReg.group(1)
+ elif re.match('^\-\-eNBUserName=(.+)$|^\-\-eNB[1-2]UserName=(.+)$', myArgv, re.IGNORECASE):
+ if re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
+ SSH.eNBUserName = matchReg.group(1)
+ elif re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
+ SSH.eNB1UserName = matchReg.group(1)
+ elif re.match('^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE)
+ SSH.eNB2UserName = matchReg.group(1)
+ elif re.match('^\-\-eNBPassword=(.+)$|^\-\-eNB[1-2]Password=(.+)$', myArgv, re.IGNORECASE):
+ if re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE)
+ SSH.eNBPassword = matchReg.group(1)
+ elif re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
+ SSH.eNB1Password = matchReg.group(1)
+ elif re.match('^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE)
+ SSH.eNB2Password = matchReg.group(1)
+ elif re.match('^\-\-eNBSourceCodePath=(.+)$|^\-\-eNB[1-2]SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
+ if re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
+ SSH.eNBSourceCodePath = matchReg.group(1)
+ elif re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
+ SSH.eNB1SourceCodePath = matchReg.group(1)
+ elif re.match('^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
+ SSH.eNB2SourceCodePath = matchReg.group(1)
elif re.match('^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE)
SSH.EPCIPAddress = matchReg.group(1)
@@ -3772,6 +3986,9 @@ if re.match('^TerminateeNB$', mode, re.IGNORECASE):
if SSH.eNBIPAddress == '' or SSH.eNBUserName == '' or SSH.eNBPassword == '':
Usage()
sys.exit('Insufficient Parameter')
+ SSH.eNB_serverId = '0'
+ SSH.eNB_instance = '0'
+ SSH.eNBSourceCodePath = '/tmp/'
SSH.TerminateeNB()
elif re.match('^TerminateUE$', mode, re.IGNORECASE):
if (SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == ''):
@@ -3864,15 +4081,15 @@ elif re.match('^FinalizeHtml$', mode, re.IGNORECASE):
SSH.CreateHtmlFooter(SSH.finalStatus)
elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re.IGNORECASE):
if re.match('^TesteNB$', mode, re.IGNORECASE):
- if SSH.eNBIPAddress == '' or SSH.eNBRepository == '' or SSH.eNBBranch == '' or SSH.eNBUserName == '' or SSH.eNBPassword == '' or SSH.eNBSourceCodePath == '' or SSH.EPCIPAddress == '' or SSH.EPCUserName == '' or SSH.EPCPassword == '' or SSH.EPCType == '' or SSH.EPCSourceCodePath == '' or SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == '':
+ if SSH.eNBIPAddress == '' or SSH.ranRepository == '' or SSH.ranBranch == '' or SSH.eNBUserName == '' or SSH.eNBPassword == '' or SSH.eNBSourceCodePath == '' or SSH.EPCIPAddress == '' or SSH.EPCUserName == '' or SSH.EPCPassword == '' or SSH.EPCType == '' or SSH.EPCSourceCodePath == '' or SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == '':
Usage()
sys.exit('Insufficient Parameter')
- if (SSH.EPCIPAddress != ''):
+ if (SSH.EPCIPAddress != '') and (SSH.EPCIPAddress != 'none'):
SSH.copyout(SSH.EPCIPAddress, SSH.EPCUserName, SSH.EPCPassword, cwd + "/tcp_iperf_stats.awk", "/tmp")
SSH.copyout(SSH.EPCIPAddress, SSH.EPCUserName, SSH.EPCPassword, cwd + "/active_net_interfaces.awk", "/tmp")
else:
- if SSH.UEIPAddress == '' or SSH.eNBRepository == '' or SSH.eNBBranch == '' or SSH.UEUserName == '' or SSH.UEPassword == '' or SSH.UESourceCodePath == '':
+ if SSH.UEIPAddress == '' or SSH.ranRepository == '' or SSH.ranBranch == '' or SSH.UEUserName == '' or SSH.UEPassword == '' or SSH.UESourceCodePath == '':
Usage()
sys.exit('UE: Insufficient Parameter')
@@ -3915,7 +4132,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
else:
logging.debug('ERROR: requested test is invalidly formatted: ' + test)
sys.exit(1)
- SSH.CheckFlexranCtrlInstallation()
+ if (SSH.EPCIPAddress != '') and (SSH.EPCIPAddress != 'none'):
+ SSH.CheckFlexranCtrlInstallation()
#get the list of tests to be done
todo_tests=[]
@@ -3948,6 +4166,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
SSH.GetAllUEDevices(terminate_ue_flag)
if action == 'Build_eNB':
SSH.BuildeNB()
+ elif action == 'WaitEndBuild_eNB':
+ SSH.WaitBuildeNBisFinished()
elif action == 'Initialize_eNB':
SSH.InitializeeNB()
elif action == 'Terminate_eNB':
diff --git a/ci-scripts/xml_files/multi_rru_band38_build.xml b/ci-scripts/xml_files/multi_rru_band38_build.xml
new file mode 100644
index 0000000000..614ef394f3
--- /dev/null
+++ b/ci-scripts/xml_files/multi_rru_band38_build.xml
@@ -0,0 +1,84 @@
+
+
+ build-tab
+ Build
+ wrench
+
+ 010101 010102 010103
+ 000101 000102 000103
+
+
+
+
+ Build_eNB
+ Build RCC
+ -w USRP -c --eNB
+ 0
+ 0
+ True
+
+
+
+ WaitEndBuild_eNB
+ Wait for end of Build RCC
+ -w USRP -c --eNB
+ 0
+ 0
+
+
+
+ Build_eNB
+ Build Master RRU
+ -w USRP -c --eNB
+ 1
+ 1
+ True
+
+
+
+ WaitEndBuild_eNB
+ Wait for end of Build Master RRU
+ -w USRP -c --eNB
+ 1
+ 1
+
+
+
+ Build_eNB
+ Build Slave RRU
+ -w USRP -c --eNB
+ 2
+ 2
+ True
+
+
+
+ WaitEndBuild_eNB
+ Wait for end of Build Slave RRU
+ -w USRP -c --eNB
+ 2
+ 2
+
+
+
diff --git a/ci-scripts/xml_files/multi_rru_band38_full_termination.xml b/ci-scripts/xml_files/multi_rru_band38_full_termination.xml
new file mode 100644
index 0000000000..d63c73aec5
--- /dev/null
+++ b/ci-scripts/xml_files/multi_rru_band38_full_termination.xml
@@ -0,0 +1,53 @@
+
+
+ test-full-termintation
+ Test-RCC-RRUs-Termination
+ off
+
+ 030211 030212 030213
+
+
+
+
+ Terminate_eNB
+ Terminate RCC
+ 0
+ 0
+
+
+
+ Terminate_eNB
+ Terminate Master RRU
+ 1
+ 1
+
+
+
+ Terminate_eNB
+ Terminate Slave RRU
+ 2
+ 2
+
+
+
diff --git a/ci-scripts/xml_files/multi_rru_band38_test_10mhz_tm1.xml b/ci-scripts/xml_files/multi_rru_band38_test_10mhz_tm1.xml
new file mode 100644
index 0000000000..70fba65f05
--- /dev/null
+++ b/ci-scripts/xml_files/multi_rru_band38_test_10mhz_tm1.xml
@@ -0,0 +1,86 @@
+
+
+ test-multi-rru-10
+ Test-Multi-RRU-10MHz
+ tasks
+
+ 030211 030212 030213
+ 030111 030112 030113
+ 000001
+ 030211 030212 030213
+
+
+
+
+ IdleSleep
+ Sleep
+ 60
+
+
+
+ Initialize_eNB
+ Initialize RCC (TDD/Band38/10MHz)
+ -O ci-scripts/conf_files/rcc.band38.tm1.50PRB.multi.rru.conf --noS1
+ 0
+ 0
+
+
+
+ Initialize_eNB
+ Initialize Master RRU (TDD/Band38/10MHz)
+ -O ci-scripts/conf_files/rru.band38.tm1.master.conf --noS1
+ 1
+ 1
+
+
+
+ Initialize_eNB
+ Initialize Slave RRU (TDD/Band38/10MHz)
+ -O ci-scripts/conf_files/rru.band38.tm1.slave.conf --noS1
+ 2
+ 2
+
+
+
+ Terminate_eNB
+ Terminate RCC
+ 0
+ 0
+
+
+
+ Terminate_eNB
+ Terminate Master RRU
+ 1
+ 1
+
+
+
+ Terminate_eNB
+ Terminate Slave RRU
+ 2
+ 2
+
+
+
diff --git a/openair1/SCHED/ru_procedures.c b/openair1/SCHED/ru_procedures.c
index 928b272edd..1f1a36b238 100644
--- a/openair1/SCHED/ru_procedures.c
+++ b/openair1/SCHED/ru_procedures.c
@@ -100,7 +100,7 @@ void feptx0(RU_t *ru,int slot) {
*/
int num_symb = 7;
- if (subframe_select(fp,subframe) == SF_S) num_symb=fp->dl_symbols_in_S_subframe;
+ if (subframe_select(fp,subframe) == SF_S) num_symb=fp->dl_symbols_in_S_subframe+1;
if (ru->generate_dmrs_sync == 1 && slot == 0 && subframe == 1 && aa==0) {
//int32_t dmrs[ru->frame_parms.ofdm_symbol_size*14] __attribute__((aligned(32)));
diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c
index 3105b7c855..76016ba0a6 100644
--- a/targets/RT/USER/lte-enb.c
+++ b/targets/RT/USER/lte-enb.c
@@ -635,15 +635,12 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe) {
AssertFatal((ret=pthread_mutex_lock(&proc->mutex_RU_PRACH))==0,"mutex_lock return %d\n",ret);
for (i=0; inum_RU; i++) {
- if (ru == eNB->RU_list[i]) {
- LOG_D(PHY,"frame %d, subframe %d: RU %d for eNB %d signals PRACH (mask %x, num_RU %d)\n",frame,subframe,i,eNB->Mod_id,proc->RU_mask_prach,eNB->num_RU);
-
- if ((proc->RU_mask_prach&(1< 0)
- LOG_E(PHY,"eNB %d frame %d, subframe %d : previous information (PRACH) from RU %d (num_RU %d, mask %x) has not been served yet!\n",
- eNB->Mod_id,frame,subframe,ru->idx,eNB->num_RU,proc->RU_mask_prach);
-
- proc->RU_mask_prach |= (1<RU_list[i] && eNB->RU_list[i]->wait_cnt == 0) {
+ LOG_D(PHY,"frame %d, subframe %d: RU %d for eNB %d signals PRACH (mask %x, num_RU %d)\n",frame,subframe,i,eNB->Mod_id,proc->RU_mask_prach,eNB->num_RU);
+ proc->RU_mask_prach |= (1<RU_list[i]->state == RU_SYNC || eNB->RU_list[i]->wait_cnt > 0) {
+ proc->RU_mask_prach |= (1<RU_mask_prach != (1<num_RU)-1) { // not all RUs have provided their information so return
diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c
index 8ed220da8e..3ec08ac7b4 100644
--- a/targets/RT/USER/lte-ru.c
+++ b/targets/RT/USER/lte-ru.c
@@ -217,6 +217,7 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) {
if (proc->symbol_mask[*subframe]==0) { // this is normal case, if not true then we received a PULTICK before the previous subframe was finished
do {
recv_IF4p5(ru, &f, &sf, &packet_type, &symbol_number);
+ LOG_D(PHY,"fh_if4p5_south_in: RU %d, frame %d, subframe %d, f %d, sf %d\n",ru->idx,*frame,*subframe,f,sf);
if (oai_exit == 1 || ru->cmd== STOP_RU) break;
if (packet_type == IF4p5_PULFFT) proc->symbol_mask[sf] = proc->symbol_mask[sf] | (1<symbol_mask[*subframe]);
- } while(proc->symbol_mask[*subframe] != symbol_mask_full);
+ LOG_D(PHY,"rx_fh_if4p5 for RU %d: subframe %d, sf %d, symbol mask %x\n",ru->idx,*subframe,sf,proc->symbol_mask[sf]);
+ } while(proc->symbol_mask[sf] != symbol_mask_full);
}
else {
f = *frame;
@@ -437,10 +438,13 @@ void fh_if4p5_north_asynch_in(RU_t *ru,int *frame,int *subframe) {
proc->first_tx = 0;
symbol_mask_full = ((subframe_select(fp,*subframe) == SF_S) ? (1<dl_symbols_in_S_subframe) : (1<symbols_per_tti))-1;
} else {
- AssertFatal(frame_tx == *frame,
+ /* AssertFatal(frame_tx == *frame,
"frame_tx %d is not what we expect %d\n",frame_tx,*frame);
AssertFatal(subframe_tx == *subframe,
"In frame_tx %d : subframe_tx %d is not what we expect %d\n",frame_tx,subframe_tx,*subframe);
+ */
+ *frame = frame_tx;
+ *subframe = subframe_tx;
}
if (packet_type == IF4p5_PDLFFT) {
@@ -1661,7 +1665,7 @@ void *ru_thread( void *param ) {
proc->instance_cnt_asynch_rxtx=0;
pthread_cond_signal(&proc->cond_asynch_rxtx);
AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_asynch_rxtx))==0,"mutex_unlock returns %d\n",ret);
- } else LOG_I(PHY,"RU %d no asynch_south interface\n",ru->idx);
+ } else LOG_D(PHY,"RU %d no asynch_south interface\n",ru->idx);
// if this is a slave RRU, try to synchronize on the DL frequency
if ((ru->is_slave == 1) && (ru->if_south == LOCAL_RF)) do_ru_synch(ru);
@@ -1872,7 +1876,8 @@ void *ru_thread_synch(void *arg) {
&avg);
LOG_I(PHY,"RU synch cnt %d: %d, val %llu (%d dB,%d dB)\n",cnt,ru->rx_offset,(unsigned long long)peak_val,dB_fixed64(peak_val),dB_fixed64(avg));
cnt++;
- if (/*ru->rx_offset >= 0*/dB_fixed(peak_val)>=85 && cnt>10) {
+ //if (/*ru->rx_offset >= 0*/dB_fixed(peak_val)>=85 && cnt>10) {
+ if (ru->rx_offset >= 0 && avg>0 && dB_fixed(peak_val/avg)>=15 && cnt>10) {
LOG_I(PHY,"Estimated peak_val %d dB, avg %d => timing offset %llu\n",dB_fixed(peak_val),dB_fixed(avg),(unsigned long long int)ru->rx_offset);
ru->in_synch = 1;
/*
@@ -2628,7 +2633,7 @@ void init_RU(char *rf_config_file, clock_source_t clock_source,clock_source_t ti
// NOTE: multiple CC_id are not handled here yet!
ru->openair0_cfg.clock_source = clock_source;
ru->openair0_cfg.time_source = time_source;
-// ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0;
+ ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0;
if (ru->generate_dmrs_sync == 1) {
generate_ul_ref_sigs();
ru->dmrssync = (int16_t*)malloc16_clear(ru->frame_parms.ofdm_symbol_size*2*sizeof(int16_t));
@@ -2919,6 +2924,8 @@ void RCconfig_RU(void) {
RC.ru[j]->max_pdschReferenceSignalPower = *(RUParamList.paramarray[j][RU_MAX_RS_EPRE_IDX].uptr);;
RC.ru[j]->max_rxgain = *(RUParamList.paramarray[j][RU_MAX_RXGAIN_IDX].uptr);
RC.ru[j]->num_bands = RUParamList.paramarray[j][RU_BAND_LIST_IDX].numelt;
+ /* sf_extension is in unit of samples for 30.72MHz here, has to be scaled later */
+ RC.ru[j]->sf_extension = *(RUParamList.paramarray[j][RU_SF_EXTENSION_IDX].uptr);
for (i=0;inum_bands;i++) RC.ru[j]->band[i] = RUParamList.paramarray[j][RU_BAND_LIST_IDX].iptr[i];
} //strcmp(local_rf, "yes") == 0
else {