Skip to content

Commit

Permalink
getPayloadData unit test, if no plugins are found, look in the CMSSW_…
Browse files Browse the repository at this point in the history
…RELEASE_BASE or CMSSW_FULL_RELEASE_BASE in case of patch releases
  • Loading branch information
mmusich committed Jun 26, 2021
1 parent 16e3f88 commit 1fe632c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CondCore/Utilities/scripts/getPayloadData.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def discover_plugins():
releases = [
os.environ.get('CMSSW_BASE', None),
os.environ.get('CMSSW_RELEASE_BASE', None)
os.environ.get('CMSSW_FULL_RELEASE_BASE', None)
]

for r in releases:
Expand All @@ -137,7 +138,12 @@ def discover_plugins():
plugins += glob.glob(path + '/plugin*_PayloadInspector.so' )
output('found plugins: ', plugins)

if r: break # break loop if CMSSW_BASE is specified
# if no plugins are found in the local release,
# go found them in the release base
if(len(plugins)==0):
output('# plugins found:',len(plugins))
else:
if r: break # break loop if CMSSW_BASE is specified

# extracts the object name from plugin path:
# /afs/cern.ch/cms/slc6_amd64_gcc493/cms/cmssw/CMSSW_8_0_6/lib/slc6_amd64_gcc493/pluginBasicPayload_PayloadInspector.so
Expand Down

0 comments on commit 1fe632c

Please sign in to comment.