Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:28

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