diff --git a/ci-scripts/cls_physim.py b/ci-scripts/cls_physim.py index 99c634269705a73fac4fd01fa8bfc35e279d50f6..09ed1c8363b06908b1291717a52f2b58c71e768b 100644 --- a/ci-scripts/cls_physim.py +++ b/ci-scripts/cls_physim.py @@ -34,7 +34,8 @@ import sshconnection #to update the HTML object import html from multiprocessing import SimpleQueue - +#for log folder maintenance +import os class PhySim: def __init__(self): @@ -53,27 +54,32 @@ class PhySim: #private attributes self.__workSpacePath='' self.__buildLogFile='compile_phy_sim.log' - self.__runLogFile='ldpctest_run_results.log' + self.__runLogFile='' self.__runResults=[] + self.__runLogPath='phy_sim_logs' #----------------- #PRIVATE Methods #----------------- - def __CheckResults_PhySim(self,HTML,CONST): + def __CheckResults_PhySim(self,HTML,CONST,testcase_id): 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 Encoding and Decoding mean values + self.__runResults=[] with open(self.__runLogFile) as f: for line in f: if 'mean' in line: self.__runResults.append(line) - #the value are appended for each test, so we take the last 2 values from the list - info=self.__runResults[-1]+self.__runResults[-2] + #the value are appended for each mean value (2), so we take these 2 values from the list + info=self.__runResults[0]+self.__runResults[1] + + #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>' @@ -153,7 +159,7 @@ class PhySim: mySSH.command('cd cmake_targets', '\$', 5) mySSH.command('mkdir -p log', '\$', 5) mySSH.command('chmod 777 log', '\$', 5) - mySSH.command('stdbuf -o0 ./build_oai ' + self.buildargs + ' 2>&1 | stdbuf -o0 tee compile_oai_enb.log', 'Bypassing the Tests|build have failed', 1500) + mySSH.command('stdbuf -o0 ./build_oai ' + self.buildargs + ' 2>&1 | stdbuf -o0 tee ' + self.__buildLogFile, 'Bypassing the Tests|build have failed', 1500) mySSH.close() #check build status and update HTML object @@ -162,7 +168,11 @@ class PhySim: return lHTML - def Run_PhySim(self,htmlObj,constObj): + def Run_PhySim(self,htmlObj,constObj,testcase_id): + #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) @@ -172,5 +182,5 @@ class PhySim: mySSH.close() #return updated HTML to main lHTML = html.HTMLManagement() - lHTML=self.__CheckResults_PhySim(htmlObj,constObj) + lHTML=self.__CheckResults_PhySim(htmlObj,constObj,testcase_id) return lHTML diff --git a/ci-scripts/main.py b/ci-scripts/main.py index ed2a56e6886e083a625ed1d8305291a09d84c279..a1c1ac7ec046eb3915431072e6d155dbf3754d2e 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -3724,7 +3724,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re HTML=ldpc.Build_PhySim(HTML,CONST) if ldpc.exitStatus==1:sys.exit() elif action == 'Run_PhySim': - ldpc.Run_PhySim(HTML,CONST) + HTML=ldpc.Run_PhySim(HTML,CONST,id) else: sys.exit('Invalid action') CiTestObj.FailReportCnt += 1 diff --git a/ci-scripts/xml_files/ldpc_gpu_test.xml b/ci-scripts/xml_files/ldpc_gpu_test.xml index 4d398bc9954bb51892789d25e02e5031dd46d027..029c49ecf55064f4ecb5ce1cb874c3f6f0600842 100644 --- a/ci-scripts/xml_files/ldpc_gpu_test.xml +++ b/ci-scripts/xml_files/ldpc_gpu_test.xml @@ -26,7 +26,7 @@ <htmlTabName>Test-ldpc-GPU</htmlTabName> <htmlTabIcon>tasks</htmlTabIcon> <repeatCount>1</repeatCount> - <TestCaseRequestedList>000001 000002 000003</TestCaseRequestedList> + <TestCaseRequestedList>000001 000002 000003 000004 000005 000006 000007 000008 000009 000010 000011 000012 000013 000014 000015 000016 000017 000018 000019 000020 000021</TestCaseRequestedList> <TestCaseExclusionList></TestCaseExclusionList> <testCase id="000001"> @@ -38,13 +38,123 @@ <testCase id="000002"> <class>Run_PhySim</class> <desc>Run LDPC Test with CPU</desc> - <physim_run_args>-l 8448 -s10 -n100</physim_run_args> + <physim_run_args>-l 3872 -s10 -n100</physim_run_args> </testCase> <testCase id="000003"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with GPU</desc> + <physim_run_args>-l 3872 -s10 -n100 -G 1</physim_run_args> + </testCase> + + <testCase id="000004"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with CPU</desc> + <physim_run_args>-l 4224 -s10 -n100</physim_run_args> + </testCase> + + <testCase id="000005"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with GPU</desc> + <physim_run_args>-l 4224 -s10 -n100 -G 1</physim_run_args> + </testCase> + + <testCase id="000006"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with CPU</desc> + <physim_run_args>-l 4576 -s10 -n100</physim_run_args> + </testCase> + + <testCase id="000007"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with GPU</desc> + <physim_run_args>-l 4576 -s10 -n100 -G 1</physim_run_args> + </testCase> + + <testCase id="000008"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with CPU</desc> + <physim_run_args>-l 4928 -s10 -n100</physim_run_args> + </testCase> + + <testCase id="000009"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with GPU</desc> + <physim_run_args>-l 4928 -s10 -n100 -G 1</physim_run_args> + </testCase> + + <testCase id="000010"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with CPU</desc> + <physim_run_args>-l 5280 -s10 -n100</physim_run_args> + </testCase> + + <testCase id="000011"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with GPU</desc> + <physim_run_args>-l 5280 -s10 -n100 -G 1</physim_run_args> + </testCase> + + <testCase id="000012"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with CPU</desc> + <physim_run_args>-l 5632 -s10 -n100</physim_run_args> + </testCase> + + <testCase id="000013"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with GPU</desc> + <physim_run_args>-l 5632 -s10 -n100 -G 1</physim_run_args> + </testCase> + + <testCase id="000014"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with CPU</desc> + <physim_run_args>-l 6336 -s10 -n100</physim_run_args> + </testCase> + + <testCase id="000015"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with GPU</desc> + <physim_run_args>-l 6336 -s10 -n100 -G 1</physim_run_args> + </testCase> + + <testCase id="000016"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with CPU</desc> + <physim_run_args>-l 7040 -s10 -n100</physim_run_args> + </testCase> + + <testCase id="000017"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with GPU</desc> + <physim_run_args>-l 7040 -s10 -n100 -G 1</physim_run_args> + </testCase> + + <testCase id="000018"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with CPU</desc> + <physim_run_args>-l 7744 -s10 -n100</physim_run_args> + </testCase> + + <testCase id="000019"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with GPU</desc> + <physim_run_args>-l 7744 -s10 -n100 -G 1</physim_run_args> + </testCase> + + <testCase id="000020"> + <class>Run_PhySim</class> + <desc>Run LDPC Test with CPU</desc> + <physim_run_args>-l 8448 -s10 -n100</physim_run_args> + </testCase> + + <testCase id="000021"> <class>Run_PhySim</class> <desc>Run LDPC Test with GPU</desc> <physim_run_args>-l 8448 -s10 -n100 -G 1</physim_run_args> </testCase> + + </testCaseList>