Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #!/bin/bash
0002 
0003 # I was not successful figuring out how to run this shell script outside
0004 # of the "scramv1 b runtests" command, but one can run the executable
0005 # run by this script using the values for the two variables (modified for
0006 # each test release) along with the commands in the shell script below.
0007 #LOCAL_TMP_DIR=/uscms_data/d1/wdd/CMSSW_1_8_0_pre2/tmp/slc4_ia32_gcc345
0008 #LOCAL_TEST_DIR=/uscms_data/d1/wdd/CMSSW_1_8_0_pre2/src/FWCore/Framework/test
0009 
0010 LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
0011 exe=TestFWCoreFrameworkStatemachine
0012 input=${LOCAL_TEST_DIR}/unit_test_outputs/statemachine_
0013 output=statemachine_output_
0014 reference_output=${LOCAL_TEST_DIR}/unit_test_outputs/statemachine_output_
0015 
0016 function die { echo Failure $1: status $2 ; exit $2 ; }
0017 
0018 for i in 1 2 5 6 7 8 9 10 11
0019 do
0020 
0021     ${exe} -i ${input}${i}.txt -o ${output}${i}.txt || die "TestFWCoreFrameworkStatemachine with input ${i}" $?
0022     diff ${reference_output}${i}.txt ${output}${i}.txt || die "comparing ${output}${i}.txt" $?  
0023 
0024   done
0025 
0026   for i in 3 4
0027   do
0028 
0029     ${exe} -i ${input}${i}.txt -o ${output}${i}.txt || die "TestFWCoreFrameworkStatemachine with input ${i}" $?
0030     diff ${reference_output}${i}.txt ${output}${i}.txt || die "comparing ${output}${i}.txt" $?  
0031 
0032   done
0033 
0034   for i in 12
0035   do
0036 
0037     ${exe} -i ${input}${i}.txt -o ${output}${i}.txt || die "TestFWCoreFrameworkStatemachine with input ${i}" $?
0038     diff ${reference_output}${i}.txt ${output}${i}.txt || die "comparing ${output}${i}.txt" $?  
0039 
0040 done
0041 
0042 #testing exceptions
0043 for i in 20 21 22 23
0044 do
0045 
0046     ${exe} -i ${input}${i}.txt -o ${output}${i}.txt || die "TestFWCoreFrameworkStatemachine with input ${i}" $?
0047     diff ${reference_output}${i}.txt ${output}${i}.txt || die "comparing ${output}${i}.txt" $?
0048 
0049 done