CI: adding support to start/stop enb/rcc/rru on multiple physical servers
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
+121
-66
@@ -43,6 +43,7 @@ ENB_PROCESS_SEG_FAULT = -11
|
||||
ENB_PROCESS_ASSERTION = -12
|
||||
ENB_PROCESS_REALTIME_ISSUE = -13
|
||||
ENB_PROCESS_NOLOGFILE_TO_ANALYZE = -14
|
||||
ENB_PROCESS_SLAVE_RRU_NOT_SYNCED = -15
|
||||
HSS_PROCESS_FAILED = -2
|
||||
HSS_PROCESS_OK = +2
|
||||
MME_PROCESS_FAILED = -3
|
||||
@@ -113,12 +114,10 @@ class SSHConnection():
|
||||
self.desc = ''
|
||||
self.Build_eNB_args = ''
|
||||
self.Initialize_eNB_args = ''
|
||||
self.eNBLogFile = ''
|
||||
self.eNB_instance = ''
|
||||
self.eNB_serverId = ''
|
||||
self.eNBOptions = ''
|
||||
self.rruOptions = ''
|
||||
self.rruLogFile = ''
|
||||
self.eNBLogFiles = ['', '', '']
|
||||
self.eNBOptions = ['', '', '']
|
||||
self.ping_args = ''
|
||||
self.ping_packetloss_threshold = ''
|
||||
self.iperf_args = ''
|
||||
@@ -543,7 +542,22 @@ class SSHConnection():
|
||||
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
|
||||
|
||||
def InitializeeNB(self):
|
||||
if self.eNBIPAddress == '' or self.eNBUserName == '' or self.eNBPassword == '' or self.eNBSourceCodePath == '':
|
||||
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')
|
||||
check_eNB = False
|
||||
@@ -564,10 +578,10 @@ class SSHConnection():
|
||||
logging.debug('\u001B[1m Launching tshark on interface ' + eth_interface + '\u001B[0m')
|
||||
self.EPC_PcapFileName = 'enb_' + self.testCase_id + '_s1log.pcap'
|
||||
self.command('echo ' + self.EPCPassword + ' | sudo -S rm -f /tmp/' + self.EPC_PcapFileName, '\$', 5)
|
||||
self.command('echo $USER; nohup sudo tshark -f "host ' + self.eNBIPAddress +'" -i ' + eth_interface + ' -w /tmp/' + self.EPC_PcapFileName + ' > /tmp/tshark.log 2>&1 &', self.EPCUserName, 5)
|
||||
self.command('echo $USER; nohup sudo tshark -f "host ' + lIpAddr +'" -i ' + eth_interface + ' -w /tmp/' + self.EPC_PcapFileName + ' > /tmp/tshark.log 2>&1 &', self.EPCUserName, 5)
|
||||
self.close()
|
||||
self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword)
|
||||
self.command('cd ' + self.eNBSourceCodePath, '\$', 5)
|
||||
self.open(lIpAddr, lUserName, lPassWord)
|
||||
self.command('cd ' + lSourcePath, '\$', 5)
|
||||
# Initialize_eNB_args usually start with -O and followed by the location in repository
|
||||
full_config_file = self.Initialize_eNB_args.replace('-O ','')
|
||||
extra_options = ''
|
||||
@@ -580,31 +594,34 @@ class SSHConnection():
|
||||
logging.debug('\u001B[1m Compiling and launching T Tracer\u001B[0m')
|
||||
self.command('cd common/utils/T/tracer', '\$', 5)
|
||||
self.command('make', '\$', 10)
|
||||
self.command('echo $USER; nohup ./record -d ../T_messages.txt -o ' + self.eNBSourceCodePath + '/cmake_targets/enb_' + self.testCase_id + '_record.raw -ON -off VCD -off HEAVY -off LEGACY_GROUP_TRACE -off LEGACY_GROUP_DEBUG > ' + self.eNBSourceCodePath + '/cmake_targets/enb_' + self.testCase_id + '_record.log 2>&1 &', self.eNBUserName, 5)
|
||||
self.command('cd ' + self.eNBSourceCodePath, '\$', 5)
|
||||
self.command('echo $USER; nohup ./record -d ../T_messages.txt -o ' + lSourcePath + '/cmake_targets/enb_' + self.testCase_id + '_record.raw -ON -off VCD -off HEAVY -off LEGACY_GROUP_TRACE -off LEGACY_GROUP_DEBUG > ' + lSourcePath + '/cmake_targets/enb_' + self.testCase_id + '_record.log 2>&1 &', lUserName, 5)
|
||||
self.command('cd ' + lSourcePath, '\$', 5)
|
||||
full_config_file = full_config_file[:extIdx + 5]
|
||||
config_path, config_file = os.path.split(full_config_file)
|
||||
else:
|
||||
sys.exit('Insufficient Parameter')
|
||||
ci_full_config_file = config_path + '/ci-' + config_file
|
||||
rruCheck = False
|
||||
result = re.search('rru|du.band', str(config_file))
|
||||
result = re.search('^rru|^rcc|^du.band', str(config_file))
|
||||
if result is not None:
|
||||
rruCheck = True
|
||||
# do not reset board twice in IF4.5 case
|
||||
result = re.search('rru|enb|du.band', str(config_file))
|
||||
result = re.search('^rru|^enb|^du.band', str(config_file))
|
||||
if result is not None:
|
||||
self.command('echo ' + self.eNBPassword + ' | sudo -S uhd_find_devices', '\$', 10)
|
||||
self.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 10)
|
||||
result = re.search('type: b200', str(self.ssh.before))
|
||||
if result is not None:
|
||||
logging.debug('Found a B2xx device --> resetting it')
|
||||
self.command('echo ' + self.eNBPassword + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10)
|
||||
self.command('echo ' + lPassWord + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10)
|
||||
# Reloading FGPA bin firmware
|
||||
self.command('echo ' + self.eNBPassword + ' | sudo -S uhd_find_devices', '\$', 15)
|
||||
self.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 15)
|
||||
# Make a copy and adapt to EPC / eNB IP addresses
|
||||
self.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5)
|
||||
self.command('sed -i -e \'s/CI_MME_IP_ADDR/' + self.EPCIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
self.command('sed -i -e \'s/CI_ENB_IP_ADDR/' + self.eNBIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
self.command('sed -i -e \'s/CI_ENB_IP_ADDR/' + lIpAddr + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
self.command('sed -i -e \'s/CI_RCC_IP_ADDR/' + self.eNBIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
self.command('sed -i -e \'s/CI_RRU1_IP_ADDR/' + self.eNB1IPAddress + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
self.command('sed -i -e \'s/CI_RRU2_IP_ADDR/' + self.eNB2IPAddress + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
if self.flexranCtrlInstalled and self.flexranCtrlStarted:
|
||||
self.command('sed -i -e \'s/FLEXRAN_ENABLED.*;/FLEXRAN_ENABLED = "yes";/\' ' + ci_full_config_file, '\$', 2);
|
||||
else:
|
||||
@@ -612,18 +629,13 @@ class SSHConnection():
|
||||
# Launch eNB with the modified config file
|
||||
self.command('source oaienv', '\$', 5)
|
||||
self.command('cd cmake_targets', '\$', 5)
|
||||
self.command('echo "ulimit -c unlimited && ./lte_build_oai/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
|
||||
self.command('echo "ulimit -c unlimited && ./lte_build_oai/build/lte-softmodem -O ' + lSourcePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
|
||||
self.command('chmod 775 ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
|
||||
self.command('echo ' + self.eNBPassword + ' | sudo -S rm -Rf enb_' + self.testCase_id + '.log', '\$', 5)
|
||||
self.command('echo ' + self.eNBPassword + ' | sudo -S -E daemon --inherit --unsafe --name=enb' + str(self.eNB_instance) + '_daemon --chdir=' + self.eNBSourceCodePath + '/cmake_targets -o ' + self.eNBSourceCodePath + '/cmake_targets/enb_' + self.testCase_id + '.log ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
|
||||
result = re.search('rcc|enb|cu.band', str(config_file))
|
||||
if result is not None:
|
||||
self.eNBLogFile = 'enb_' + self.testCase_id + '.log'
|
||||
if extra_options != '':
|
||||
self.eNBOptions = extra_options
|
||||
result = re.search('rru|du.band', str(config_file))
|
||||
if result is not None:
|
||||
self.rruLogFile = 'enb_' + self.testCase_id + '.log'
|
||||
self.command('echo ' + lPassWord + ' | sudo -S rm -Rf enb_' + self.testCase_id + '.log', '\$', 5)
|
||||
self.command('echo ' + lPassWord + ' | sudo -S -E daemon --inherit --unsafe --name=enb' + str(self.eNB_instance) + '_daemon --chdir=' + lSourcePath + '/cmake_targets -o ' + lSourcePath + '/cmake_targets/enb_' + self.testCase_id + '.log ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
|
||||
self.eNBLogFiles[int(self.eNB_instance)] = 'enb_' + self.testCase_id + '.log'
|
||||
if extra_options != '':
|
||||
self.eNBOptions[int(self.eNB_instance)] = extra_options
|
||||
time.sleep(6)
|
||||
doLoop = True
|
||||
loopCounter = 10
|
||||
@@ -653,7 +665,7 @@ class SSHConnection():
|
||||
if self.EPC_PcapFileName != '':
|
||||
copyin_res = self.copyin(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, '/tmp/' + self.EPC_PcapFileName, '.')
|
||||
if (copyin_res == 0):
|
||||
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/.')
|
||||
sys.exit(1)
|
||||
else:
|
||||
self.command('stdbuf -o0 cat enb_' + self.testCase_id + '.log | egrep --text --color=never -i "wait|sync|Starting"', '\$', 4)
|
||||
@@ -665,8 +677,6 @@ class SSHConnection():
|
||||
time.sleep(6)
|
||||
else:
|
||||
doLoop = False
|
||||
if rruCheck and extra_options != '':
|
||||
self.rruOptions = extra_options
|
||||
self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'OK', ALL_PROCESSES_OK)
|
||||
logging.debug('\u001B[1m Initialize eNB Completed\u001B[0m')
|
||||
time.sleep(10)
|
||||
@@ -2431,13 +2441,13 @@ class SSHConnection():
|
||||
if (status < 0):
|
||||
result = status
|
||||
if result == ENB_PROCESS_FAILED:
|
||||
fileCheck = re.search('enb_', str(self.eNBLogFile))
|
||||
fileCheck = re.search('enb_', str(self.eNBLogFiles[0]))
|
||||
if fileCheck is not None:
|
||||
self.copyin(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, self.eNBSourceCodePath + '/cmake_targets/' + self.eNBLogFile, '.')
|
||||
logStatus = self.AnalyzeLogFile_eNB(self.eNBLogFile)
|
||||
self.copyin(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, self.eNBSourceCodePath + '/cmake_targets/' + self.eNBLogFiles[0], '.')
|
||||
logStatus = self.AnalyzeLogFile_eNB(self.eNBLogFiles[0])
|
||||
if logStatus < 0:
|
||||
result = logStatus
|
||||
self.eNBLogFile = ''
|
||||
self.eNBLogFiles[0] = ''
|
||||
if self.flexranCtrlInstalled and self.flexranCtrlStarted:
|
||||
self.TerminateFlexranCtrl()
|
||||
return result
|
||||
@@ -2575,17 +2585,20 @@ class SSHConnection():
|
||||
cdrxActivationMessageCount = 0
|
||||
dropNotEnoughRBs = 0
|
||||
self.htmleNBFailureMsg = ''
|
||||
isRRU = False
|
||||
isSlave = False
|
||||
slaveReceivesFrameResyncCmd = False
|
||||
for line in enb_log_file.readlines():
|
||||
if self.rruOptions != '':
|
||||
res1 = re.search('max_rxgain (?P<requested_option>[0-9]+)', self.rruOptions)
|
||||
if self.eNBOptions[int(self.eNB_instance)] != '':
|
||||
res1 = re.search('max_rxgain (?P<requested_option>[0-9]+)', self.eNBOptions[int(self.eNB_instance)])
|
||||
res2 = re.search('max_rxgain (?P<applied_option>[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 += '<span class="glyphicon glyphicon-ok-circle"></span> Command line option(s) correctly applied <span class="glyphicon glyphicon-arrow-right"></span> ' + self.rruOptions + '\n\n'
|
||||
self.htmleNBFailureMsg += '<span class="glyphicon glyphicon-ok-circle"></span> Command line option(s) correctly applied <span class="glyphicon glyphicon-arrow-right"></span> ' + self.eNBOptions[int(self.eNB_instance)] + '\n\n'
|
||||
else:
|
||||
self.htmleNBFailureMsg += '<span class="glyphicon glyphicon-ban-circle"></span> Command line option(s) NOT applied <span class="glyphicon glyphicon-arrow-right"></span> ' + self.rruOptions + '\n\n'
|
||||
self.htmleNBFailureMsg += '<span class="glyphicon glyphicon-ban-circle"></span> Command line option(s) NOT applied <span class="glyphicon glyphicon-arrow-right"></span> ' + self.eNBOptions[int(self.eNB_instance)] + '\n\n'
|
||||
result = re.search('Exiting OAI softmodem', str(line))
|
||||
if result is not None:
|
||||
exitSignalReceived = True
|
||||
@@ -2607,6 +2620,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
|
||||
@@ -2700,6 +2724,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
|
||||
@@ -2887,18 +2922,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()
|
||||
@@ -2912,39 +2965,33 @@ 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!'
|
||||
@@ -3513,6 +3560,8 @@ class SSHConnection():
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' process faced Real Time issue(s)</td>\n')
|
||||
elif (processesStatus == ENB_PROCESS_NOLOGFILE_TO_ANALYZE) or (processesStatus == OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE):
|
||||
self.htmlFile.write(' <td bgcolor = "orange" >OK?</td>\n')
|
||||
elif (processesStatus == ENB_PROCESS_SLAVE_RRU_NOT_SYNCED):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' Slave RRU could not synch</td>\n')
|
||||
elif (processesStatus == OAI_UE_PROCESS_COULD_NOT_SYNC):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - UE could not sync</td>\n')
|
||||
elif (processesStatus == HSS_PROCESS_FAILED):
|
||||
@@ -3649,11 +3698,17 @@ def GetParametersFromXML(action):
|
||||
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')
|
||||
|
||||
Reference in New Issue
Block a user