Skip to content

Commit

Permalink
execute dryrun test in a clean env. Fix #5121 (#5122)
Browse files Browse the repository at this point in the history
  • Loading branch information
belforte authored Nov 30, 2021
1 parent b033ff0 commit b79c77b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/python/CRABClient/Commands/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,11 @@ def executeTestRun(self, filecacheurl, uniquerequestname):
opts = ''
for opt in optsList:
opts = opts + ' %s' % opt
command = 'sh CMSRunAnalysis.sh ' + opts
# job wrapper needs to be executed in a clean shell, like it happens in the WN, not
# inside the environemnt where CRABClient runs (i.e. some CMSSW env. which may conflict
# with the WMCore code used in the wrapper
undoScram = "eval `scram unsetenv -sh`; "
command = undoScram + 'sh CMSRunAnalysis.sh ' + opts
out, err, returncode = execute_command(command=command)
self.logger.debug(out)
if returncode != 0:
Expand Down

0 comments on commit b79c77b

Please sign in to comment.