From 711b56701c4b2bfac3c472eba71cdddb0abc604e Mon Sep 17 00:00:00 2001 From: mmusich Date: Tue, 2 Apr 2024 14:48:26 +0200 Subject: [PATCH 1/2] add protections to test_unitSubmitPVrbr.sh and test_unitSubmitPVsplit.sh when DAS returns no runnable output --- .../test/testingScripts/test_unitSubmitPVrbr.sh | 11 +++++++++-- .../test/testingScripts/test_unitSubmitPVsplit.sh | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVrbr.sh b/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVrbr.sh index 1d1856e2f1574..4bb41252e6513 100755 --- a/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVrbr.sh +++ b/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVrbr.sh @@ -18,8 +18,15 @@ scriptName="PVValidation_testingOfflineGT_HLTPhysics_Run2023D_0.sh" # Create directory if it doesn't exist mkdir -p "./testExecution" -# Copy script to the test execution directory -cp -pr "./BASH/${scriptName}" "./testExecution/" +# Check if the script exists and is a regular file +if [ -f "./BASH/${scriptName}" ]; then + # Copy script to the test execution directory + cp -pr "./BASH/${scriptName}" "./testExecution/" +else + # Emit a warning if the script doesn't exist or is not a regular file + echo "Warning: Script '${scriptName}' not found or is not a regular file. Skipping excution of further tests." + exit 0 +fi # Change directory to the test execution directory cd "./testExecution" || exit 1 diff --git a/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVsplit.sh b/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVsplit.sh index ac2cd7b1442ac..e797ed9a9d15d 100755 --- a/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVsplit.sh +++ b/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVsplit.sh @@ -13,8 +13,15 @@ scriptName="batchHarvester_Prompt_0.sh" # Create directory if it doesn't exist mkdir -p "./testExecution" -# Copy script to the test execution directory -cp -pr "./BASH/${scriptName}" "./testExecution/" +# Check if the script exists and is a regular file +if [ -f "./BASH/${scriptName}" ]; then + # Copy script to the test execution directory + cp -pr "./BASH/${scriptName}" "./testExecution/" +else + # Emit a warning if the script doesn't exist or is not a regular file + echo "Warning: Script '${scriptName}' not found or is not a regular file. Skipping excution of further tests." + exit 0 +fi # Change directory to the test execution directory cd "./testExecution" || exit 1 From fe9b0a50868bcd01d7886146c456588528126efc Mon Sep 17 00:00:00 2001 From: mmusich Date: Tue, 2 Apr 2024 14:48:53 +0200 Subject: [PATCH 2/2] drop unused test_all-in-one.sh, since when moved to the new all-in-one tool --- .../test/testingScripts/test_all-in-one.sh | 163 ------------------ 1 file changed, 163 deletions(-) delete mode 100755 Alignment/OfflineValidation/test/testingScripts/test_all-in-one.sh diff --git a/Alignment/OfflineValidation/test/testingScripts/test_all-in-one.sh b/Alignment/OfflineValidation/test/testingScripts/test_all-in-one.sh deleted file mode 100755 index e13ebd50499d5..0000000000000 --- a/Alignment/OfflineValidation/test/testingScripts/test_all-in-one.sh +++ /dev/null @@ -1,163 +0,0 @@ -#! /bin/bash -function die { echo $1: status $2 ; exit $2; } - -if test -f "validation_config.ini"; then - rm -f validation_config.ini -fi - -## copy into local sqlite file the ideal alignment -echo "COPYING locally Ideal Alignment ..." -conddb --yes --db pro copy TrackerAlignment_Upgrade2017_design_v4 --destdb myfile.db -conddb --yes --db pro copy TrackerAlignmentErrorsExtended_Upgrade2017_design_v0 --destdb myfile.db - -echo "GENERATING all-in-one tool configuration ..." -cat <> validation_config.ini -[general] -jobmode = interactive -eosdir = Test - -[alignment:prompt] -title = prompt -globaltag = 92X_dataRun2_Prompt_v2 -color = 1 -style = 2001 - -[alignment:express] -title = express -globaltag = 92X_dataRun2_Express_v2 -condition TrackerAlignmentRcd = sqlite_file:myfile.db,TrackerAlignment_Upgrade2017_design_v4 -condition TrackerAlignmentErrorExtendedRcd = sqlite_file:myfile.db,TrackerAlignmentErrorsExtended_Upgrade2017_design_v0 -color = 2 -style = 2402 - -[offline:validation_MinBias] -multiIOV = false -maxevents = 10 -dataset = /MinimumBias/Run2017A-TkAlMinBias-PromptReco-v1/ALCARECO -magneticfield = 3.8 -trackcollection = ALCARECOTkAlMinBias - -[offline:validation_cosmics] -multiIOV = false -maxevents = 10 -dataset = /Cosmics/Run2017A-TkAlCosmics0T-PromptReco-v1/ALCARECO -magneticfield = 3.8 -trackcollection = ALCARECOTkAlCosmicsCTF0T - -[compare:Tracker] -multiIOV = false -levels = "Tracker","DetUnit" -dbOutput = false - -[zmumu:some_zmumu_validation] -multiIOV = false -maxevents = 10 -dataset = /DoubleMuon/Run2017A-TkAlZMuMu-PromptReco-v3/ALCARECO -etamaxneg = 2.4 -etaminneg = -2.4 -etamaxpos = 2.4 -etaminpos = -2.4 - -[primaryvertex:validation_HLTPhysics] -maxevents = 10000 -multiIOV = false -dataset = /HLTPhysics/Run2017A-TkAlMinBias-PromptReco-v1/ALCARECO -trackcollection = ALCARECOTkAlMinBias -vertexcollection = offlinePrimaryVertices -isda = True -ismc = True -numberOfBins = 48 -runboundary = 1 -lumilist = None -ptCut = 3. -etaCut = 2.5 -runControl = False - -[pvresolution:validation_JetHT] -multiIOV = false -maxevents = 50000 -dataset = /JetHT/Run2017B-TkAlMinBias-09Aug2019_UL2017-v1/ALCARECO -trackcollection = ALCARECOTkAlMinBias -runboundary = 1 -runControl = False -doTriggerSelection = False -triggerBits = "*" - -[split:some_split_validation] -multiIOV = false -maxevents = 10 -dataset = /Cosmics/Run2017A-TkAlCosmics0T-PromptReco-v1/ALCARECO -trackcollection = ALCARECOTkAlCosmicsCTF0T - -[plots:offline] -DMROptions = plain split -DMRMinimum = 5 -legendoptions = meanerror rmserror modules outside -customtitle = #CMS{Preliminary} -customrighttitle = 2017A cosmics and collisions data -legendheader = header -bigtext = true - -[plots:split] -outliercut = 0.95 - -customtitle = #CMS{Preliminary} -customrighttitle = 2017A 3.8T cosmics data -legendheader = header - -[plots:zmumu] -customtitle = #CMS{Preliminary} -customrighttitle = 2016G Z#rightarrow#mu#mu data, |#eta|<2.4 -legendheader = header - -[plots:primaryvertex] -doMaps = true -stdResiduals = true -autoLimits = false -m_dxyPhiMax = 40 -m_dzPhiMax = 40 -m_dxyEtaMax = 40 -m_dzEtaMax = 40 -m_dxyPhiNormMax = 0.5 -m_dzPhiNormMax = 0.5 -m_dxyEtaNormMax = 0.5 -m_dzEtaNormMax = 0.5 -w_dxyPhiMax = 150 -w_dzPhiMax = 150 -w_dxyEtaMax = 150 -w_dzEtaMax = 1000 -w_dxyPhiNormMax = 1.8 -w_dzPhiNormMax = 1.8 -w_dxyEtaNormMax = 1.8 -w_dzEtaNormMax = 1.8 - -[validation] -offline validation_MinBias - prompt : -offline validation_MinBias - express : -offline validation_cosmics - prompt : -offline validation_cosmics - express : -primaryvertex validation_HLTPhysics - prompt : -primaryvertex validation_HLTPhysics - express : -pvresolution validation_JetHT - prompt : -pvresolution validation_JetHT - express : -compare Tracker - prompt 278819, express 278819 : -zmumu some_zmumu_validation - prompt : -zmumu some_zmumu_validation - express : -split some_split_validation - prompt : -split some_split_validation - express : -EOF - -echo " TESTING all-in-one tool ..." -validateAlignments.py -c validation_config.ini -N testingAllInOneTool --dryRun || die "Failure running all-in-one test" $? - -printf "\n\n" - -echo " TESTING all-in-one tool configuration ..." -FILES="$PWD/testingAllInOneTool/*_cfg.py" -for f in $FILES -do - echo "Processing $f file..." - python3 $FILE/$f || die "Failure compiling test configuration" $? -done - -