diff --git a/ci-scripts/cls_physim.py b/ci-scripts/cls_physim.py
index 09ed1c8363..4ca36b8cf0 100644
--- a/ci-scripts/cls_physim.py
+++ b/ci-scripts/cls_physim.py
@@ -51,6 +51,7 @@ class PhySim:
self.ranAllowMerge= ""
self.ranTargetBranch= ""
self.exitStatus=0
+ self.forced_workspace_cleanup=False
#private attributes
self.__workSpacePath=''
self.__buildLogFile='compile_phy_sim.log'
@@ -75,7 +76,7 @@ class PhySim:
for line in f:
if 'mean' in 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]
#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.name "OAI Jenkins"', '\$', 5)
- #git clean
- mySSH.command('echo ' + self.eNBPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
+ #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 != '':
diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index a1c1ac7ec0..b105c19f13 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -3211,6 +3211,14 @@ def GetParametersFromXML(action):
if 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
if action == 'Run_PhySim':
ldpc.runargs = test.findtext('physim_run_args')
diff --git a/ci-scripts/xml_files/ldpc_gpu_test.xml b/ci-scripts/xml_files/ldpc_gpu_test.xml
index 029c49ecf5..136cd72b1e 100644
--- a/ci-scripts/xml_files/ldpc_gpu_test.xml
+++ b/ci-scripts/xml_files/ldpc_gpu_test.xml
@@ -33,6 +33,7 @@
Build_PhySim
Build for physical simulator
--phy_simulators --ninja
+ TRUE