update 3 after review
This commit is contained in:
@@ -51,6 +51,7 @@ class PhySim:
|
|||||||
self.ranAllowMerge= ""
|
self.ranAllowMerge= ""
|
||||||
self.ranTargetBranch= ""
|
self.ranTargetBranch= ""
|
||||||
self.exitStatus=0
|
self.exitStatus=0
|
||||||
|
self.forced_workspace_cleanup=False
|
||||||
#private attributes
|
#private attributes
|
||||||
self.__workSpacePath=''
|
self.__workSpacePath=''
|
||||||
self.__buildLogFile='compile_phy_sim.log'
|
self.__buildLogFile='compile_phy_sim.log'
|
||||||
@@ -75,7 +76,7 @@ class PhySim:
|
|||||||
for line in f:
|
for line in f:
|
||||||
if 'mean' in line:
|
if 'mean' in line:
|
||||||
self.__runResults.append(line)
|
self.__runResults.append(line)
|
||||||
#the value are appended for each mean value (2), so we take these 2 values from the list
|
#the values are appended for each mean value (2), so we take these 2 values from the list
|
||||||
info=self.__runResults[0]+self.__runResults[1]
|
info=self.__runResults[0]+self.__runResults[1]
|
||||||
|
|
||||||
#once parsed move the local logfile to its folder for tidiness
|
#once parsed move the local logfile to its folder for tidiness
|
||||||
@@ -138,8 +139,12 @@ class PhySim:
|
|||||||
mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
|
mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
|
||||||
mySSH.command('git config user.name "OAI Jenkins"', '\$', 5)
|
mySSH.command('git config user.name "OAI Jenkins"', '\$', 5)
|
||||||
|
|
||||||
#git clean
|
#git clean depending on self.forced_workspace_cleanup captured in xml
|
||||||
mySSH.command('echo ' + self.eNBPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
|
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 the commit ID is provided, use it to point to it
|
||||||
if self.ranCommitID != '':
|
if self.ranCommitID != '':
|
||||||
|
|||||||
@@ -3211,6 +3211,14 @@ def GetParametersFromXML(action):
|
|||||||
|
|
||||||
if action == 'Build_PhySim':
|
if action == 'Build_PhySim':
|
||||||
ldpc.buildargs = test.findtext('physim_build_args')
|
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
|
||||||
|
|
||||||
if action == 'Run_PhySim':
|
if action == 'Run_PhySim':
|
||||||
ldpc.runargs = test.findtext('physim_run_args')
|
ldpc.runargs = test.findtext('physim_run_args')
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
<class>Build_PhySim</class>
|
<class>Build_PhySim</class>
|
||||||
<desc>Build for physical simulator</desc>
|
<desc>Build for physical simulator</desc>
|
||||||
<physim_build_args>--phy_simulators --ninja</physim_build_args>
|
<physim_build_args>--phy_simulators --ninja</physim_build_args>
|
||||||
|
<forced_workspace_cleanup>TRUE</forced_workspace_cleanup>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="000002">
|
<testCase id="000002">
|
||||||
|
|||||||
Reference in New Issue
Block a user