From 03ff1ef3044f6a6fdcedddaf1daf7430abcf23a5 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Tue, 23 Jun 2020 22:29:23 +0200 Subject: [PATCH] update 2 after review --- ci-scripts/cls_physim.py | 26 ++++-- ci-scripts/main.py | 2 +- ci-scripts/xml_files/ldpc_gpu_test.xml | 114 ++++++++++++++++++++++++- 3 files changed, 131 insertions(+), 11 deletions(-) diff --git a/ci-scripts/cls_physim.py b/ci-scripts/cls_physim.py index 99c6342697..09ed1c8363 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 = '
' + info  + '
' @@ -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_.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 ed2a56e688..a1c1ac7ec0 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 4d398bc995..029c49ecf5 100644 --- a/ci-scripts/xml_files/ldpc_gpu_test.xml +++ b/ci-scripts/xml_files/ldpc_gpu_test.xml @@ -26,7 +26,7 @@ Test-ldpc-GPU tasks 1 - 000001 000002 000003 + 000001 000002 000003 000004 000005 000006 000007 000008 000009 000010 000011 000012 000013 000014 000015 000016 000017 000018 000019 000020 000021 @@ -38,13 +38,123 @@ Run_PhySim Run LDPC Test with CPU - -l 8448 -s10 -n100 + -l 3872 -s10 -n100 + Run_PhySim + Run LDPC Test with GPU + -l 3872 -s10 -n100 -G 1 + + + + Run_PhySim + Run LDPC Test with CPU + -l 4224 -s10 -n100 + + + + Run_PhySim + Run LDPC Test with GPU + -l 4224 -s10 -n100 -G 1 + + + + Run_PhySim + Run LDPC Test with CPU + -l 4576 -s10 -n100 + + + + Run_PhySim + Run LDPC Test with GPU + -l 4576 -s10 -n100 -G 1 + + + + Run_PhySim + Run LDPC Test with CPU + -l 4928 -s10 -n100 + + + + Run_PhySim + Run LDPC Test with GPU + -l 4928 -s10 -n100 -G 1 + + + + Run_PhySim + Run LDPC Test with CPU + -l 5280 -s10 -n100 + + + + Run_PhySim + Run LDPC Test with GPU + -l 5280 -s10 -n100 -G 1 + + + + Run_PhySim + Run LDPC Test with CPU + -l 5632 -s10 -n100 + + + + Run_PhySim + Run LDPC Test with GPU + -l 5632 -s10 -n100 -G 1 + + + + Run_PhySim + Run LDPC Test with CPU + -l 6336 -s10 -n100 + + + + Run_PhySim + Run LDPC Test with GPU + -l 6336 -s10 -n100 -G 1 + + + + Run_PhySim + Run LDPC Test with CPU + -l 7040 -s10 -n100 + + + + Run_PhySim + Run LDPC Test with GPU + -l 7040 -s10 -n100 -G 1 + + + + Run_PhySim + Run LDPC Test with CPU + -l 7744 -s10 -n100 + + + + Run_PhySim + Run LDPC Test with GPU + -l 7744 -s10 -n100 -G 1 + + + + Run_PhySim + Run LDPC Test with CPU + -l 8448 -s10 -n100 + + + Run_PhySim Run LDPC Test with GPU -l 8448 -s10 -n100 -G 1 + +