Commit c94ba6ec authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

CI test for T1 LDPC offload on caracal

parent 914b4703
...@@ -88,6 +88,40 @@ class PhySim: ...@@ -88,6 +88,40 @@ class PhySim:
HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue) HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue)
return HTML 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 = '<pre style="background-color:white">' + info + '</pre>'
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'<pre style="background-color:white">{error_msg}</pre>')
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): def __CheckResults_NRulsimTest(self, HTML, CONST, testcase_id):
html_queue = SimpleQueue() html_queue = SimpleQueue()
#retrieve run log file and store it locally #retrieve run log file and store it locally
...@@ -216,6 +250,24 @@ class PhySim: ...@@ -216,6 +250,24 @@ class PhySim:
lHTML=self.__CheckResults_LDPCTest(htmlObj,constObj,testcase_id) lHTML=self.__CheckResults_LDPCTest(htmlObj,constObj,testcase_id)
return lHTML 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_<testcase_id>.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): def Run_NRulsimTest(self, htmlObj, constObj, testcase_id):
self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/' self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/'
os.system(f'mkdir -p ./{self.__runLogPath}') os.system(f'mkdir -p ./{self.__runLogPath}')
......
...@@ -472,7 +472,7 @@ def GetParametersFromXML(action): ...@@ -472,7 +472,7 @@ def GetParametersFromXML(action):
if (string_field is not None): if (string_field is not None):
CONTAINERS.cliOptions = string_field 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') ldpc.runargs = test.findtext('physim_run_args')
elif action == 'LicenceAndFormattingCheck': elif action == 'LicenceAndFormattingCheck':
...@@ -963,6 +963,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -963,6 +963,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
HTML=ldpc.Run_LDPCTest(HTML,CONST,id) HTML=ldpc.Run_LDPCTest(HTML,CONST,id)
if ldpc.exitStatus==1: if ldpc.exitStatus==1:
RAN.prematureExit = True 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': elif action == 'Run_NRulsimTest':
HTML=ldpc.Run_NRulsimTest(HTML,CONST,id) HTML=ldpc.Run_NRulsimTest(HTML,CONST,id)
if ldpc.exitStatus==1: if ldpc.exitStatus==1:
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
- Build_Cluster_Image - Build_Cluster_Image
- Build_PhySim - Build_PhySim
- Run_LDPCTest - Run_LDPCTest
- Run_LDPCt1Test
- Run_NRulsimTest - Run_NRulsimTest
- Build_eNB - Build_eNB
- WaitEndBuild_eNB - WaitEndBuild_eNB
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<mode>TesteNB</mode> <mode>TesteNB</mode>
<class>Build_eNB</class> <class>Build_eNB</class>
<desc>Build gNB (USRP)</desc> <desc>Build gNB (USRP)</desc>
<Build_eNB_args>--gNB -w USRP --ninja -c -P --build-lib "ldpc_cuda"</Build_eNB_args> <Build_eNB_args>--gNB -w USRP --ninja -c -P --build-lib "ldpc_cuda ldpc_t1"</Build_eNB_args>
<forced_workspace_cleanup>True</forced_workspace_cleanup> <forced_workspace_cleanup>True</forced_workspace_cleanup>
</testCase> </testCase>
......
...@@ -24,31 +24,79 @@ ...@@ -24,31 +24,79 @@
<htmlTabName>Test T1 Offload</htmlTabName> <htmlTabName>Test T1 Offload</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount> <repeatCount>1</repeatCount>
<TestCaseRequestedList>000001 000002 000003 000004</TestCaseRequestedList> <TestCaseRequestedList>000111 000112 000121 000122 000131 000132 000211 000212 000221 000222 000231 000232</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001"> <testCase id="000111">
<class>Run_NRulsimTest</class> <class>Run_LDPCt1Test</class>
<desc>Run T1 Offload nr_ulsim</desc> <desc>Run nr_ulsim with CPU</desc>
<physim_run_args>-n2 -s30 -m9 -r50 -R106 -o</physim_run_args> <physim_run_args>-n100 -s30 -m5 -r106 -R106 -C10 -P</physim_run_args>
</testCase> </testCase>
<testCase id="000002"> <testCase id="000112">
<class>Run_NRulsimTest</class> <class>Run_LDPCt1Test</class>
<desc>Run T1 Offload nr_ulsim</desc> <desc>Run nr_ulsim with T1 LDPC offload</desc>
<physim_run_args>-n2 -s30 -m9 -r106 -R106 -o</physim_run_args> <physim_run_args>-n100 -s30 -m5 -r106 -R106 -o -P</physim_run_args>
</testCase> </testCase>
<testCase id="000003"> <testCase id="000121">
<class>Run_NRulsimTest</class> <class>Run_LDPCt1Test</class>
<desc>Run T1 Offload nr_ulsim</desc> <desc>Run nr_ulsim with CPU</desc>
<physim_run_args>-n2 -s30 -m16 -r106 -R106 -o</physim_run_args> <physim_run_args>-n100 -s30 -m15 -r106 -R106 -C10 -P</physim_run_args>
</testCase> </testCase>
<testCase id="000004"> <testCase id="000122">
<class>Run_NRulsimTest</class> <class>Run_LDPCt1Test</class>
<desc>Run T1 Offload nr_ulsim</desc> <desc>Run nr_ulsim with T1 LDPC offload</desc>
<physim_run_args>-n2 -s30 -m9 -r273 -R273 -o</physim_run_args> <physim_run_args>-n100 -s30 -m15 -r106 -R106 -o -P</physim_run_args>
</testCase>
<testCase id="000131">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with CPU</desc>
<physim_run_args>-n100 -s30 -m25 -r106 -R106 -C10 -P</physim_run_args>
</testCase>
<testCase id="000132">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with T1 LDPC offload</desc>
<physim_run_args>-n100 -s30 -m25 -r106 -R106 -o -P</physim_run_args>
</testCase>
<testCase id="000211">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with CPU</desc>
<physim_run_args>-n100 -s30 -m5 -r273 -R273 -C10 -P</physim_run_args>
</testCase>
<testCase id="000212">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with T1 LDPC offload</desc>
<physim_run_args>-n100 -s30 -m5 -r273 -R273 -o -P</physim_run_args>
</testCase>
<testCase id="000221">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with CPU</desc>
<physim_run_args>-n100 -s30 -m15 -r273 -R273 -C10 -P</physim_run_args>
</testCase>
<testCase id="000222">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with T1 LDPC offload</desc>
<physim_run_args>-n100 -s30 -m15 -r273 -R273 -o -P</physim_run_args>
</testCase>
<testCase id="000231">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with CPU</desc>
<physim_run_args>-n100 -s30 -m25 -r273 -R273 -C10 -P</physim_run_args>
</testCase>
<testCase id="000232">
<class>Run_LDPCt1Test</class>
<desc>Run nr_ulsim with T1 LDPC offload</desc>
<physim_run_args>-n100 -s30 -m25 -r273 -R273 -o -P</physim_run_args>
</testCase> </testCase>
</testCaseList> </testCaseList>
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