CI: Remove unused Build_Physim
This commit is contained in:
@@ -40,21 +40,13 @@ import re
|
|||||||
|
|
||||||
class PhySim:
|
class PhySim:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.buildargs = ""
|
|
||||||
self.runargs = ""
|
self.runargs = ""
|
||||||
self.eNBIpAddr = ""
|
self.eNBIpAddr = ""
|
||||||
self.eNBUserName = ""
|
self.eNBUserName = ""
|
||||||
self.eNBPassWord = ""
|
self.eNBPassWord = ""
|
||||||
self.eNBSourceCodePath = ""
|
self.eNBSourceCodePath = ""
|
||||||
self.ranRepository = ""
|
|
||||||
self.ranBranch = ""
|
|
||||||
self.ranCommitID= ""
|
|
||||||
self.ranAllowMerge= ""
|
|
||||||
self.ranTargetBranch= ""
|
|
||||||
self.forced_workspace_cleanup=False
|
|
||||||
#private attributes
|
#private attributes
|
||||||
self.__workSpacePath=''
|
self.__workSpacePath=''
|
||||||
self.__buildLogFile='compile_phy_sim.log'
|
|
||||||
self.__runLogFile=''
|
self.__runLogFile=''
|
||||||
self.__runLogPath='phy_sim_logs'
|
self.__runLogPath='phy_sim_logs'
|
||||||
|
|
||||||
@@ -123,77 +115,9 @@ class PhySim:
|
|||||||
HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', [info + '\n' + error_msg])
|
HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', [info + '\n' + error_msg])
|
||||||
return success
|
return success
|
||||||
|
|
||||||
def __CheckBuild_PhySim(self, HTML, CONST):
|
|
||||||
self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/'
|
|
||||||
mySSH = sshconnection.SSHConnection()
|
|
||||||
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
|
|
||||||
#retrieve compile log file and store it locally
|
|
||||||
mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__buildLogFile, '.')
|
|
||||||
#delete older run log file
|
|
||||||
mySSH.command('rm ' + self.__workSpacePath+self.__runLogFile, '\$', 5)
|
|
||||||
mySSH.close()
|
|
||||||
#check build result from local compile log file
|
|
||||||
with open(self.__buildLogFile) as f:
|
|
||||||
if 'BUILD SHOULD BE SUCCESSFUL' in f.read():
|
|
||||||
HTML.CreateHtmlTestRow(self.buildargs, 'OK', CONST.ALL_PROCESSES_OK, 'PhySim')
|
|
||||||
return True
|
|
||||||
logging.error('\u001B[1m Building Physical Simulators Failed\u001B[0m')
|
|
||||||
HTML.CreateHtmlTestRow(self.buildargs, 'KO', CONST.ALL_PROCESSES_OK, 'LDPC')
|
|
||||||
HTML.CreateHtmlTabFooter(False)
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
#-----------------$
|
#-----------------$
|
||||||
#PUBLIC Methods$
|
#PUBLIC Methods$
|
||||||
#-----------------$
|
#-----------------$
|
||||||
|
|
||||||
def Build_PhySim(self,htmlObj,constObj):
|
|
||||||
mySSH = sshconnection.SSHConnection()
|
|
||||||
mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord)
|
|
||||||
|
|
||||||
#create working dir
|
|
||||||
mySSH.command('mkdir -p ' + self.eNBSourceCodePath, '\$', 5)
|
|
||||||
mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5)
|
|
||||||
|
|
||||||
if not self.ranRepository.lower().endswith('.git'):
|
|
||||||
self.ranRepository+='.git'
|
|
||||||
|
|
||||||
#git clone
|
|
||||||
mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.ranRepository + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
|
|
||||||
#git config
|
|
||||||
mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
|
|
||||||
mySSH.command('git config user.name "OAI Jenkins"', '\$', 5)
|
|
||||||
|
|
||||||
#git clean depending on self.forced_workspace_cleanup captured in xml
|
|
||||||
if self.forced_workspace_cleanup==True:
|
|
||||||
logging.info('Cleaning workspace ...')
|
|
||||||
mySSH.command('echo ' + self.eNBPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
|
|
||||||
else:
|
|
||||||
logging.info('Workspace cleaning was disabled')
|
|
||||||
|
|
||||||
# if the commit ID is provided, use it to point to it
|
|
||||||
if self.ranCommitID != '':
|
|
||||||
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
|
|
||||||
# if the branch is not develop, then it is a merge request and we need to do
|
|
||||||
# the potential merge. Note that merge conflicts should have already been checked earlier
|
|
||||||
if (self.ranAllowMerge):
|
|
||||||
if self.ranTargetBranch == '':
|
|
||||||
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
|
|
||||||
mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30)
|
|
||||||
else:
|
|
||||||
logging.info('Merging with the target branch: ' + self.ranTargetBranch)
|
|
||||||
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 30)
|
|
||||||
|
|
||||||
#build
|
|
||||||
mySSH.command('source oaienv', '\$', 5)
|
|
||||||
mySSH.command('cd cmake_targets', '\$', 5)
|
|
||||||
mySSH.command('mkdir -p log', '\$', 5)
|
|
||||||
mySSH.command(f'./build_oai {self.buildargs} 2>&1 | tee {self.__buildLogFile}', '\$', 1500)
|
|
||||||
|
|
||||||
mySSH.close()
|
|
||||||
return __CheckBuild_PhySim(htmlObj,constObj)
|
|
||||||
|
|
||||||
|
|
||||||
def Run_CUDATest(self,htmlObj,constObj,testcase_id):
|
def Run_CUDATest(self,htmlObj,constObj,testcase_id):
|
||||||
self.__workSpacePath = self.eNBSourceCodePath+'/cmake_targets/'
|
self.__workSpacePath = self.eNBSourceCodePath+'/cmake_targets/'
|
||||||
#create run logs folder locally
|
#create run logs folder locally
|
||||||
|
|||||||
@@ -289,18 +289,6 @@ def ExecuteActionWithParam(action):
|
|||||||
st = test.findtext('idle_sleep_time_in_sec') or "5"
|
st = test.findtext('idle_sleep_time_in_sec') or "5"
|
||||||
success = cls_oaicitest.IdleSleep(HTML, int(st))
|
success = cls_oaicitest.IdleSleep(HTML, int(st))
|
||||||
|
|
||||||
elif action == 'Build_PhySim':
|
|
||||||
ldpc.buildargs = test.findtext('physim_build_args')
|
|
||||||
forced_workspace_cleanup = test.findtext('forced_workspace_cleanup')
|
|
||||||
if (forced_workspace_cleanup is None):
|
|
||||||
ldpc.forced_workspace_cleanup=False
|
|
||||||
else:
|
|
||||||
if re.match('true', forced_workspace_cleanup, re.IGNORECASE):
|
|
||||||
ldpc.forced_workspace_cleanup=True
|
|
||||||
else:
|
|
||||||
ldpc.forced_workspace_cleanup=False
|
|
||||||
success = ldpc.Build_PhySim(HTML,CONST)
|
|
||||||
|
|
||||||
elif action == 'Deploy_Run_PhySim':
|
elif action == 'Deploy_Run_PhySim':
|
||||||
success = PHYSIM.Deploy_PhySim(HTML)
|
success = PHYSIM.Deploy_PhySim(HTML)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
- Build_Proxy
|
- Build_Proxy
|
||||||
- Build_Cluster_Image
|
- Build_Cluster_Image
|
||||||
- Pull_Cluster_Image
|
- Pull_Cluster_Image
|
||||||
- Build_PhySim
|
|
||||||
- Run_CUDATest
|
- Run_CUDATest
|
||||||
- Run_T2Test
|
- Run_T2Test
|
||||||
- Build_eNB
|
- Build_eNB
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
<!--
|
|
||||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The OpenAirInterface Software Alliance licenses this file to You under
|
|
||||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
|
||||||
except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.openairinterface.org/?page_id=698
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
||||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
|
||||||
contact@openairinterface.org
|
|
||||||
-->
|
|
||||||
|
|
||||||
<testCaseList>
|
|
||||||
<htmlTabRef>build-offload</htmlTabRef>
|
|
||||||
<htmlTabName>Build physical simulators</htmlTabName>
|
|
||||||
<htmlTabIcon>tasks</htmlTabIcon>
|
|
||||||
<TestCaseRequestedList>000001</TestCaseRequestedList>
|
|
||||||
<TestCaseExclusionList></TestCaseExclusionList>
|
|
||||||
|
|
||||||
<testCase id="000001">
|
|
||||||
<class>Build_PhySim</class>
|
|
||||||
<desc>Build physical simulators</desc>
|
|
||||||
<physim_build_args>--phy_simulators --ninja --noavx512</physim_build_args>
|
|
||||||
<forced_workspace_cleanup>FALSE</forced_workspace_cleanup>
|
|
||||||
</testCase>
|
|
||||||
</testCaseList>
|
|
||||||
Reference in New Issue
Block a user