diff --git a/ci-scripts/cls_physim.py b/ci-scripts/cls_physim.py index 5efbc25aae..63aafd4d0a 100644 --- a/ci-scripts/cls_physim.py +++ b/ci-scripts/cls_physim.py @@ -88,6 +88,40 @@ class PhySim: HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue) return HTML + def __CheckResults_LDPCt1Test(self,HTML,CONST,testcase_id): + thrs_NOK = 500 + thrs_KO = 1000 + mySSH = sshconnection.SSHConnection() + mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) + #retrieve run log file and store it locally$ + mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__runLogFile, '.') + mySSH.close() + #parse results looking for Decoding values + runResultsT1=[] + with open(self.__runLogFile) as g: + for line in g: + if 'decoding time' in line: + runResultsT1.append(line) + info = runResultsT1[0][15:-13] + result = int(''.join(filter(str.isdigit, info)))/100 + #once parsed move the local logfile to its folder for tidiness + os.system('mv '+self.__runLogFile+' '+ self.__runLogPath+'/.') + #updating the HTML with results + html_cell = '
' + info + '
' + html_queue=SimpleQueue() + html_queue.put(html_cell) + if result < thrs_NOK: + HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue) + elif result > thrs_KO: + error_msg = f'Decoding time exceeds a limit of {thrs_KO} us' + logging.error(error_msg) + html_queue.put(f'
{error_msg}
') + HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', 1, html_queue) + self.exitStatus = 1 + else: + HTML.CreateHtmlTestRowQueue(self.runargs, 'NOK', 1, html_queue) + return HTML + def __CheckResults_NRulsimTest(self, HTML, CONST, testcase_id): html_queue = SimpleQueue() #retrieve run log file and store it locally @@ -216,6 +250,24 @@ class PhySim: lHTML=self.__CheckResults_LDPCTest(htmlObj,constObj,testcase_id) return lHTML + def Run_LDPCt1Test(self,htmlObj,constObj,testcase_id): + self.__workSpacePath = self.eNBSourceCodePath+'/cmake_targets/' + #create run logs folder locally + os.system('mkdir -p ./'+self.__runLogPath) + #log file is tc_.log remotely + self.__runLogFile='physim_'+str(testcase_id)+'.log' + #open a session for test run + mySSH = sshconnection.SSHConnection() + mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) + mySSH.command('cd '+self.__workSpacePath,'\$',5) + #run and redirect the results to a log file + mySSH.command(f'sudo {self.__workSpacePath}ran_build/build/nr_ulsim {self.runargs} > {self.__runLogFile} 2>&1', '\$', 30) + mySSH.close() + #return updated HTML to main + lHTML = cls_oai_html.HTMLManagement() + lHTML=self.__CheckResults_LDPCt1Test(htmlObj,constObj,testcase_id) + return lHTML + def Run_NRulsimTest(self, htmlObj, constObj, testcase_id): self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/' os.system(f'mkdir -p ./{self.__runLogPath}') diff --git a/ci-scripts/main.py b/ci-scripts/main.py index fd3f1f773a..813dc39a6a 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -43,7 +43,7 @@ import cls_physim #class PhySim for physical simulators build and import cls_cots_ue #class CotsUe for Airplane mode control import cls_containerize #class Containerize for all container-based operations on RAN/UE objects import cls_static_code_analysis #class for static code analysis -import cls_ci_ueinfra #class defining the multi Ue infrastrucure +import cls_ci_ueinfra #class defining the multi Ue infrastrucure import cls_physim1 #class PhySim for physical simulators deploy and run import cls_cluster # class for building/deploying on cluster @@ -472,7 +472,7 @@ def GetParametersFromXML(action): if (string_field is not None): CONTAINERS.cliOptions = string_field - elif action == 'Run_LDPCTest' or action == 'Run_NRulsimTest': + elif action == 'Run_LDPCTest' or action == 'Run_NRulsimTest' or action == 'Run_LDPCt1Test': ldpc.runargs = test.findtext('physim_run_args') elif action == 'LicenceAndFormattingCheck': @@ -963,6 +963,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re HTML=ldpc.Run_LDPCTest(HTML,CONST,id) if ldpc.exitStatus==1: RAN.prematureExit = True + elif action == 'Run_LDPCt1Test': + HTML=ldpc.Run_LDPCt1Test(HTML,CONST,id) + if ldpc.exitStatus==1: + RAN.prematureExit = True elif action == 'Run_NRulsimTest': HTML=ldpc.Run_NRulsimTest(HTML,CONST,id) if ldpc.exitStatus==1: diff --git a/ci-scripts/xml_class_list.yml b/ci-scripts/xml_class_list.yml index 93e3bc9fb0..82cf7227d9 100755 --- a/ci-scripts/xml_class_list.yml +++ b/ci-scripts/xml_class_list.yml @@ -2,6 +2,7 @@ - Build_Cluster_Image - Build_PhySim - Run_LDPCTest + - Run_LDPCt1Test - Run_NRulsimTest - Build_eNB - WaitEndBuild_eNB diff --git a/ci-scripts/xml_files/gnb_usrp_build.xml b/ci-scripts/xml_files/gnb_usrp_build.xml index 55331cce5a..44bc042627 100644 --- a/ci-scripts/xml_files/gnb_usrp_build.xml +++ b/ci-scripts/xml_files/gnb_usrp_build.xml @@ -35,7 +35,7 @@ TesteNB Build_eNB Build gNB (USRP) - --gNB -w USRP --ninja -c -P --build-lib "ldpc_cuda" + --gNB -w USRP --ninja -c -P --build-lib "ldpc_cuda ldpc_t1" True diff --git a/ci-scripts/xml_files/t1_offload_test.xml b/ci-scripts/xml_files/t1_offload_test.xml index 9abea4c977..cfbba04c74 100644 --- a/ci-scripts/xml_files/t1_offload_test.xml +++ b/ci-scripts/xml_files/t1_offload_test.xml @@ -24,31 +24,79 @@ Test T1 Offload tasks 1 - 000001 000002 000003 000004 + 000111 000112 000121 000122 000131 000132 000211 000212 000221 000222 000231 000232 - - Run_NRulsimTest - Run T1 Offload nr_ulsim - -n2 -s30 -m9 -r50 -R106 -o + + Run_LDPCt1Test + Run nr_ulsim with CPU + -n100 -s30 -m5 -r106 -R106 -C10 -P - - Run_NRulsimTest - Run T1 Offload nr_ulsim - -n2 -s30 -m9 -r106 -R106 -o + + Run_LDPCt1Test + Run nr_ulsim with T1 LDPC offload + -n100 -s30 -m5 -r106 -R106 -o -P - - Run_NRulsimTest - Run T1 Offload nr_ulsim - -n2 -s30 -m16 -r106 -R106 -o + + Run_LDPCt1Test + Run nr_ulsim with CPU + -n100 -s30 -m15 -r106 -R106 -C10 -P - - Run_NRulsimTest - Run T1 Offload nr_ulsim - -n2 -s30 -m9 -r273 -R273 -o + + Run_LDPCt1Test + Run nr_ulsim with T1 LDPC offload + -n100 -s30 -m15 -r106 -R106 -o -P + + Run_LDPCt1Test + Run nr_ulsim with CPU + -n100 -s30 -m25 -r106 -R106 -C10 -P + + + + Run_LDPCt1Test + Run nr_ulsim with T1 LDPC offload + -n100 -s30 -m25 -r106 -R106 -o -P + + + + Run_LDPCt1Test + Run nr_ulsim with CPU + -n100 -s30 -m5 -r273 -R273 -C10 -P + + + + Run_LDPCt1Test + Run nr_ulsim with T1 LDPC offload + -n100 -s30 -m5 -r273 -R273 -o -P + + + + Run_LDPCt1Test + Run nr_ulsim with CPU + -n100 -s30 -m15 -r273 -R273 -C10 -P + + + + Run_LDPCt1Test + Run nr_ulsim with T1 LDPC offload + -n100 -s30 -m15 -r273 -R273 -o -P + + + + Run_LDPCt1Test + Run nr_ulsim with CPU + -n100 -s30 -m25 -r273 -R273 -C10 -P + + + + Run_LDPCt1Test + Run nr_ulsim with T1 LDPC offload + -n100 -s30 -m25 -r273 -R273 -o -P + +