From b79c77bbaa08375053e781520db586f470a5ff1b Mon Sep 17 00:00:00 2001 From: Stefano Belforte Date: Tue, 30 Nov 2021 13:52:37 +0100 Subject: [PATCH] execute dryrun test in a clean env. Fix #5121 (#5122) --- src/python/CRABClient/Commands/submit.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/python/CRABClient/Commands/submit.py b/src/python/CRABClient/Commands/submit.py index 2314ed5d..fcbdc51b 100644 --- a/src/python/CRABClient/Commands/submit.py +++ b/src/python/CRABClient/Commands/submit.py @@ -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: