Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-06 22:54:40

0001 #!/bin/bash
0002 
0003 # Pass in name and status
0004 function die { echo $1: status $2 ;  exit $2; }
0005 
0006 (cmsRun --help ) || die 'Failure running cmsRun --help' $?
0007 
0008 # This test is supposed to throw an exception.
0009 # We had a bug where EventProcessor went into an
0010 # infinite wait under the circumstances in this test
0011 # and after an exception. The conditions were multiple
0012 # concurrent lumis in flight with an exception on an
0013 # event in a lumi before the last lumi.
0014 # This test passes as long as it does not go into
0015 # an infinite wait.
0016 F2=${LOCAL_TEST_DIR}/testConcurrentLumiExceptions_cfg.py
0017 echo $F2 "This test intentionally throws an exception"
0018 (cmsRun $F2 ) && die "No exception using $F2" 1
0019 
0020 # Test maxEvents output parameter
0021 F3=${LOCAL_TEST_DIR}/testMaxEventsOutput_cfg.py
0022 echo $F3
0023 (cmsRun $F3 ) || die "Failure running cmsRun $F3" $?
0024 # 6th word on the line containing the string "events"
0025 # output by edmFileUtil
0026 nEvents=`edmFileUtil file:testMaxEventsOutput.root | grep events | awk ' {print $6; exit} '`
0027 if [ "$nEvents" -lt 6 ] || [ "$nEvents" -gt 9 ]; then
0028 echo "maxEvents output test failed, nEvents = " $nEvents
0029 exit 1
0030 fi
0031 echo "number of events written = " $nEvents
0032 
0033 exit 0