Skip to content

Commit 9469bb6

Browse files
committed
Detect and report invalid predefined lists
1 parent d66390a commit 9469bb6

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

run-ib-pr-matrix.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,28 @@ pushd "$WORKSPACE/matrix-results"
7878
if [ "X$CMS_SITE_OVERRIDE" == "X" ]; then
7979
CMS_SITE_OVERRIDE="local"
8080
fi
81+
82+
# Check what workflows will be ran
83+
WORKFLOWS=$(echo $MATRIX_ARGS | sed 's|.*-l ||;s| .*||' | tr ',' '\n')
84+
WFLISTS_CNT=$(echo ${WORKFLOWS} | grep -v "^[1-9][0-9]*\(.[0-9][0-9]*\|\)\s" | wc -l)
85+
WFS_CNT=$(echo ${WORKFLOWS} | wc -l)
86+
OFILE="workflows.out"
87+
eval CMS_PATH=/cvmfs/cms-ib.cern.ch SITECONFIG_PATH=/cvmfs/cms-ib.cern.ch/SITECONF/$CMS_SITE_OVERRIDE runTheMatrix.py -j ${NJOBS} ${MATRIX_ARGS} -n 2>&1 | tee $OFILE
88+
if [ $BADLIST_CNT -gt 0 ]; then
89+
if [ $WFLISTS_CNT -ne $WFS_CNT ]; then
90+
echo "WARNING : some workflow lists were not recognized"
91+
else
92+
if [ $BADLIST_CNT -eq $WFS_CNT ]; then
93+
echo "ERROR : all workflow lists were not recognized, and no additional workflows were requested"
94+
rm $OFILE
95+
exit 1
96+
else
97+
echo "WARNING : none of the workflow lists were recognized, only running explicitly requested workflows"
98+
fi
99+
fi
100+
fi
101+
rm $OFILE
102+
81103
eval CMS_PATH=/cvmfs/cms-ib.cern.ch SITECONFIG_PATH=/cvmfs/cms-ib.cern.ch/SITECONF/$CMS_SITE_OVERRIDE runTheMatrix.py -j ${NJOBS} ${MATRIX_ARGS} 2>&1 | tee -a matrixTests.${BUILD_ID}.log
82104
mv runall-report-step123-.log runall-report-step123-.${BUILD_ID}.log
83105
find . -name DQM*.root | sort | sed 's|^./||' > wf_mapping.${BUILD_ID}.txt

0 commit comments

Comments
 (0)