Skip to content

Commit

Permalink
added extra tests for crab
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Oct 24, 2024
1 parent 0247ce9 commit 568dd7b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crab/ib-run-crab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ report() {
echo "FAILED" > $WORKSPACE/crab/statusfile
fi
}

#Checkout a package
git cms-addpkg FWCore/Version
#Added test python module and script to make sure it is part of card sandbox
mkdir -p ${CMSSW_BASE}/src/FWCore/Version/python ${CMSSW_BASE}/src/FWCore/Version/scripts
echo 'CMSBOT_CRAB_TEST="OK"' > ${CMSSW_BASE}/src/FWCore/Version/python/cmsbot_crab_test.py
echo -e '#!/bin/bash\necho OK' > ${CMSSW_BASE}/src/FWCore/Version/scripts/cmsbot_crab_test.sh
chmod +x ${CMSSW_BASE}/src/FWCore/Version/scripts/cmsbot_crab_test.sh
scram build -j $(nproc)

[ "${CRABCLIENT_TYPE}" != "" ] || export CRABCLIENT_TYPE="prod"
[ "${BUILD_ID}" != "" ] || export BUILD_ID=$(date +%s)
[ "${WORKSPACE}" != "" ] || export WORKSPACE=$(pwd) && cd $WORKSPACE
Expand Down
10 changes: 10 additions & 0 deletions crab/pset.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
# with command line options: MinBias_8TeV_cfi --conditions auto:startup -s GEN,SIM --datatier GEN-SIM -n 10
# --relval 9000,300 --eventcontent RAWSIM --io MinBias.io --python MinBias.py --no_exec --fileout minbias.root

#Testing cmsbot crab setup
def cmsbot_crab_test():
import sys
from subprocess import getstatusoutput
from FWCore.Version.cmsbot_crab_test import CMSBOT_CRAB_TEST
cmsbot_exit, cmsbot_out = getstatusoutput("cmsbot_crab_test.sh")
if e or (o != "OK") or (CMSBOT_CRAB_TEST != "OK"):
sys.exit(1)

cmsbot_crab_test()
import FWCore.ParameterSet.Config as cms

process = cms.Process("SIM")
Expand Down

0 comments on commit 568dd7b

Please sign in to comment.