diff --git a/ci-scripts/Jenkinsfile-tmp-ran b/ci-scripts/Jenkinsfile-tmp-ran index 045f93b5c6b01f6544f7c22b8a9bca84ecaf6ef9..5fd2a09598972a80f75c817a6eda711a938e3df7 100644 --- a/ci-scripts/Jenkinsfile-tmp-ran +++ b/ci-scripts/Jenkinsfile-tmp-ran @@ -328,7 +328,7 @@ pipeline { } if(fileExists("ci-scripts/test_results.html")) { sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html" - sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's#TEMPLATE_BUILD_ID#${BUILD_ID}#' test_results-${JOB_NAME}.html" + sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: ${BUILD_ID}#' test_results-${JOB_NAME}.html" archiveArtifacts "test_results-${JOB_NAME}.html" } } diff --git a/ci-scripts/main.py b/ci-scripts/main.py index dd7b871becebde6f3aff6ce2bd05eb2845465ff6..301a38e657e1257b67b5d8e223e871756450993e 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -344,7 +344,7 @@ class SSHConnection(): pStatus = self.CheckProcessExist(initialize_eNB_flag) if (pStatus < 0): self.CreateHtmlTestRow(self.Initialize_eNB_args, 'KO', pStatus) - self.CreateHtmlFooter() + self.CreateHtmlFooter(False) sys.exit(1) self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) self.command('cd ' + self.eNBSourceCodePath, '\$', 5) @@ -386,7 +386,7 @@ class SSHConnection(): doLoop = False 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.CreateHtmlFooter() + self.CreateHtmlFooter(False) self.close() sys.exit(1) else: @@ -490,7 +490,7 @@ class SSHConnection(): if (pStatus < 0): self.CreateHtmlTestRow('N/A', 'KO', pStatus) self.AutoTerminateUEandeNB() - self.CreateHtmlFooter() + self.CreateHtmlFooter(False) sys.exit(1) multi_jobs = [] status_queue = SimpleQueue() @@ -505,7 +505,7 @@ class SSHConnection(): if (status_queue.empty()): self.CreateHtmlTestRow('N/A', 'KO', ALL_PROCESSES_OK) - self.CreateHtmlFooter() + self.CreateHtmlFooter(False) self.AutoTerminateUEandeNB() sys.exit(1) else: @@ -527,7 +527,7 @@ class SSHConnection(): else: self.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue) self.AutoTerminateUEandeNB() - self.CreateHtmlFooter() + self.CreateHtmlFooter(False) sys.exit(1) def DetachUE_common(self, device_id): @@ -548,7 +548,7 @@ class SSHConnection(): if (pStatus < 0): self.CreateHtmlTestRow('N/A', 'KO', pStatus) self.AutoTerminateUEandeNB() - self.CreateHtmlFooter() + self.CreateHtmlFooter(False) sys.exit(1) multi_jobs = [] for device_id in self.UEDevices: @@ -607,7 +607,7 @@ class SSHConnection(): pStatus = self.CheckProcessExist(initialize_eNB_flag) if (pStatus < 0): self.CreateHtmlTestRow('N/A', 'KO', pStatus) - self.CreateHtmlFooter() + self.CreateHtmlFooter(False) sys.exit(1) multi_jobs = [] for device_id in self.UEDevices: @@ -746,12 +746,12 @@ class SSHConnection(): pStatus = self.CheckProcessExist(initialize_eNB_flag) if (pStatus < 0): self.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) - self.CreateHtmlFooter() + self.CreateHtmlFooter(False) sys.exit(1) ueIpStatus = self.GetAllUEIPAddresses() if (ueIpStatus < 0): self.CreateHtmlTestRow(self.ping_args, 'KO', UE_IP_ADDRESS_ISSUE) - self.CreateHtmlFooter() + self.CreateHtmlFooter(False) sys.exit(1) multi_jobs = [] i = 0 @@ -770,7 +770,7 @@ class SSHConnection(): if (status_queue.empty()): self.CreateHtmlTestRow(self.ping_args, 'KO', ALL_PROCESSES_OK) self.AutoTerminateUEandeNB() - self.CreateHtmlFooter() + self.CreateHtmlFooter(False) sys.exit(1) else: ping_status = True @@ -789,7 +789,7 @@ class SSHConnection(): else: self.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue) self.AutoTerminateUEandeNB() - self.CreateHtmlFooter() + self.CreateHtmlFooter(False) sys.exit(1) def Iperf_ComputeTime(self): @@ -1224,13 +1224,13 @@ class SSHConnection(): if (pStatus < 0): self.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus) self.AutoTerminateUEandeNB() - self.CreateHtmlFooter() + self.CreateHtmlFooter(False) sys.exit(1) ueIpStatus = self.GetAllUEIPAddresses() if (ueIpStatus < 0): self.CreateHtmlTestRow(self.iperf_args, 'KO', UE_IP_ADDRESS_ISSUE) self.AutoTerminateUEandeNB() - self.CreateHtmlFooter() + self.CreateHtmlFooter(False) sys.exit(1) multi_jobs = [] i = 0 @@ -1250,7 +1250,7 @@ class SSHConnection(): if (status_queue.empty()): self.CreateHtmlTestRow(self.iperf_args, 'KO', ALL_PROCESSES_OK) self.AutoTerminateUEandeNB() - self.CreateHtmlFooter() + self.CreateHtmlFooter(False) sys.exit(1) else: iperf_status = True @@ -1274,7 +1274,7 @@ class SSHConnection(): else: self.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue) self.AutoTerminateUEandeNB() - self.CreateHtmlFooter() + self.CreateHtmlFooter(False) sys.exit(1) def CheckProcessExist(self, initialize_eNB_flag): @@ -1523,7 +1523,7 @@ class SSHConnection(): logStatus = self.AnalyzeLogFile_eNB() if (logStatus < 0): self.CreateHtmlTestRow('N/A', 'KO', logStatus) - self.CreateHtmlFooter() + self.CreateHtmlFooter(False) sys.exit(1) else: self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) @@ -1706,14 +1706,13 @@ class SSHConnection(): self.htmlFile.write('\n') self.htmlFile.write('\n') self.htmlFile.write(' Test Results for TEMPLATE_JOB_NAME job build #TEMPLATE_BUILD_ID\n') - self.htmlFile.write(' \n') self.htmlFile.write('\n') self.htmlFile.write('\n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') @@ -1763,9 +1762,13 @@ class SSHConnection(): terminate_ue_flag = True SSH.GetAllUEDevices(terminate_ue_flag) self.htmlUEConnected = len(self.UEDevices) - self.htmlFile.write('

' + str(self.htmlUEConnected) + ' UE(s) is(are) connected to ADB bench server

\n') + self.htmlFile.write('

Jump to Final Status

\n') self.htmlFile.write('
\n') + + self.htmlFile.write('

' + str(self.htmlUEConnected) + ' UE(s) is(are) connected to ADB bench server

\n') + self.htmlFile.write('
\n') + self.htmlFile.write('

Test Summary for ' + SSH.testXMLfile + '

\n') self.htmlFile.write('
\n') self.htmlFile.write(' \n') - self.htmlFile.write(' \n') + self.htmlFile.write(' \n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') self.htmlFile.write('
\n') self.htmlFile.write(' \n') @@ -1780,8 +1783,15 @@ class SSHConnection(): self.htmlFile.write(' \n') self.htmlHeaderCreated = True - def CreateHtmlFooter(self): + def CreateHtmlFooter(self, passStatus): if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)): + self.htmlFile.write(' \n') + self.htmlFile.write(' \n') + if passStatus: + self.htmlFile.write(' \n') + else: + self.htmlFile.write(' \n') + self.htmlFile.write(' \n') self.htmlFile.write('
Final StatusPASSFAIL
\n') self.htmlFile.write('\n') self.htmlFile.write('\n') @@ -1820,7 +1830,15 @@ class SSHConnection(): else: self.htmlFile.write(' ' + str(status) + '\n') if (len(str(self.htmleNBFailureMsg)) > 2): - self.htmlFile.write('
' + self.htmleNBFailureMsg + '
\n') + cellBgColor = 'white' + result = re.search('ended with|faced real time issues', self.htmleNBFailureMsg) + if result is not None: + cellBgColor = 'red' + else: + result = re.search('showed|Reestablishment', self.htmleNBFailureMsg) + if result is not None: + cellBgColor = 'orange' + self.htmlFile.write('
' + self.htmleNBFailureMsg + '
\n') self.htmleNBFailureMsg = '' else: i = 0 @@ -2194,7 +2212,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE): else: sys.exit('Invalid action') - SSH.CreateHtmlFooter() + SSH.CreateHtmlFooter(True) else: Usage() sys.exit('Invalid mode') diff --git a/ci-scripts/reportTestLocally.sh b/ci-scripts/reportTestLocally.sh index 3a56acb7c114f536c6b9914bdb5590ee14f8e61d..e00956199c8f1ddd6b283e7e42b48f1a4fc1a306 100755 --- a/ci-scripts/reportTestLocally.sh +++ b/ci-scripts/reportTestLocally.sh @@ -343,7 +343,7 @@ then then echo " OK" >> ./test_simulator_results.html else - echo " OK" >> ./test_simulator_results.html + echo " KO" >> ./test_simulator_results.html fi echo "
" >> ./test_simulator_results.html
                 if [ $NB_ENB_GOT_SYNC -eq 1 ]