From ad33503698f291cf006e29febb25ed60dd18058d Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Tue, 7 Mar 2023 09:07:10 +0100 Subject: [PATCH] [ALCA-DB] Various fixes/improvements for unit test --- CondFormats/Common/test/BuildFile.xml | 7 +------ CondFormats/Common/test/ProduceDropBoxMetadata.py | 4 ++-- CondFormats/Common/test/createTestDBObjects.sh | 5 ++--- CondFormats/Common/test/testDropboxMetadataDB.cpp | 2 -- .../PyReleaseValidation/python/relval_2017.py | 2 ++ .../python/upgradeWorkflowComponents.py | 14 ++++++++++++-- 6 files changed, 19 insertions(+), 15 deletions(-) delete mode 100644 CondFormats/Common/test/testDropboxMetadataDB.cpp diff --git a/CondFormats/Common/test/BuildFile.xml b/CondFormats/Common/test/BuildFile.xml index 119db1cd5155c..04423d8d3676c 100644 --- a/CondFormats/Common/test/BuildFile.xml +++ b/CondFormats/Common/test/BuildFile.xml @@ -15,9 +15,4 @@ - - - - - - + diff --git a/CondFormats/Common/test/ProduceDropBoxMetadata.py b/CondFormats/Common/test/ProduceDropBoxMetadata.py index 33fd33bf3d30b..5f19feece1d08 100644 --- a/CondFormats/Common/test/ProduceDropBoxMetadata.py +++ b/CondFormats/Common/test/ProduceDropBoxMetadata.py @@ -17,11 +17,11 @@ ) # process.PoolDBOutputService.DBParameters.messageLevel = 3 -import json +import json, os def encodeJsonInString(filename): """This function open the json file and encodes it in a string replacing probelamtic characters""" - thefile = open("../data/"+filename) + thefile = open(os.path.join(os.path.dirname(__file__), "..", "data", filename)) thejson = json.load(thefile) thefile.close() return json.JSONEncoder().encode(thejson).replace('"',""") diff --git a/CondFormats/Common/test/createTestDBObjects.sh b/CondFormats/Common/test/createTestDBObjects.sh index 55945c9e8034d..51f8a1720e389 100755 --- a/CondFormats/Common/test/createTestDBObjects.sh +++ b/CondFormats/Common/test/createTestDBObjects.sh @@ -3,9 +3,8 @@ function die { echo $1: status $2 ; exit $2; } echo -e "TESTING Dropbox Metadata DB codes ...\n\n" -cd ${LOCAL_TEST_DIR}/ -cmsRun ProduceDropBoxMetadata.py || die "Failure running ProduceDropBoxMetadata.py" $? +cmsRun ${CMSSW_BASE}/src/CondFormats/Common/test/ProduceDropBoxMetadata.py || die "Failure running ProduceDropBoxMetadata.py" $? echo -e "TESTING Dropbox Metadata DB Reader code ...\n Reading local sqlite DropBoxMetadata.db \n\n " -cmsRun DropBoxMetadataReader.py || die "Failure running DropBoxMetadataReader.py" $? +cmsRun ${CMSSW_BASE}/src/CondFormats/Common/test/DropBoxMetadataReader.py || die "Failure running DropBoxMetadataReader.py" $? diff --git a/CondFormats/Common/test/testDropboxMetadataDB.cpp b/CondFormats/Common/test/testDropboxMetadataDB.cpp deleted file mode 100644 index 2f0e0c40064da..0000000000000 --- a/CondFormats/Common/test/testDropboxMetadataDB.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#include "FWCore/Utilities/interface/TestHelper.h" -RUNTEST() diff --git a/Configuration/PyReleaseValidation/python/relval_2017.py b/Configuration/PyReleaseValidation/python/relval_2017.py index eb72e9f8f9d21..68bd09c452df1 100644 --- a/Configuration/PyReleaseValidation/python/relval_2017.py +++ b/Configuration/PyReleaseValidation/python/relval_2017.py @@ -46,6 +46,7 @@ # (QCD 1.8TeV DeepCore) # (TTbar DigiNoHLT) # 2023 (TTbar, TTbar PU, TTbar PU premix) +# (TTbar FastSim) # 2024 (TTbar, TTbar PU, TTbar PU premix) numWFIB = [10001.0,10002.0,10003.0,10004.0,10005.0,10006.0,10007.0,10008.0,10009.0,10059.0,10071.0, 10042.0,10024.0,10025.0,10026.0,10023.0,10224.0,10225.0,10424.0, @@ -81,6 +82,7 @@ 11723.17, 11634.601, 12434.0,12634.0,12634.99, + 14034.0, 12834.0,13034.0,13034.99,] for numWF in numWFIB: if not numWF in _upgrade_workflows: continue diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index 7531cecebd4ec..d3445fe085c38 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -28,6 +28,8 @@ '2021FSPU', '2021postEE', '2021postEEPU', + '2023FS', + '2023FSPU', ] upgradeKeys[2026] = [ @@ -2079,7 +2081,7 @@ def setup_(self, step, stepName, stepDict, k, properties): else: stepDict[stepName][k] = merge([stepDict[step][k]]) def condition(self, fragment, stepList, key, hasHarvest): - return '2021FS' in key + return ('2021FS' in key or '2023FS' in key) upgradeWFs['Run3FStrackingOnly'] = UpgradeWorkflow_Run3FStrackingOnly( steps = [ 'Gen', @@ -2106,7 +2108,7 @@ def setup_(self, step, stepName, stepDict, k, properties): else: stepDict[stepName][k] = None def condition(self, fragment, stepList, key, hasHarvest): - return '2021FS' in key and fragment=="MinBias_14TeV" + return ('2021FS' in key or '2023FS' in key) and fragment=="MinBias_14TeV" upgradeWFs['Run3FSMBMixing'] = UpgradeWorkflow_Run3FSMBMixing( steps = [ 'Gen', @@ -2340,6 +2342,14 @@ def condition(self, fragment, stepList, key, hasHarvest): 'BeamSpot': 'Realistic25ns13p6TeVEarly2022Collision', 'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'], }, + '2023FS' : { + 'Geom' : 'DB:Extended', + 'GT' : 'auto:phase1_2023_realistic', + 'HLTmenu': '@relval2022', + 'Era' : 'Run3_FastSim', + 'BeamSpot': 'Realistic25ns13p6TeVEarly2022Collision', + 'ScenToRun' : ['Gen','FastSimRun3','HARVESTFastRun3'], + }, } # standard PU sequences