/
run_statemachine.sh
executable file
·49 lines (34 loc) · 1.71 KB
/
run_statemachine.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
# I was not successful figuring out how to run this shell script outside
# of the "scramv1 b runtests" command, but one can run the executable
# run by this script using the values for the two variables (modified for
# each test release) along with the commands in the shell script below.
#LOCAL_TMP_DIR=/uscms_data/d1/wdd/CMSSW_1_8_0_pre2/tmp/slc4_ia32_gcc345
#LOCAL_TEST_DIR=/uscms_data/d1/wdd/CMSSW_1_8_0_pre2/src/FWCore/Framework/test
LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
exe=TestFWCoreFrameworkStatemachine
input=${LOCAL_TEST_DIR}/unit_test_outputs/statemachine_
output=statemachine_output_
reference_output=${LOCAL_TEST_DIR}/unit_test_outputs/statemachine_output_
function die { echo Failure $1: status $2 ; exit $2 ; }
for i in 1 2 5 6 7 8 9 10 11
do
${exe} -i ${input}${i}.txt -o ${output}${i}.txt || die "TestFWCoreFrameworkStatemachine with input ${i}" $?
diff ${reference_output}${i}.txt ${output}${i}.txt || die "comparing ${output}${i}.txt" $?
done
for i in 3 4
do
${exe} -i ${input}${i}.txt -o ${output}${i}.txt || die "TestFWCoreFrameworkStatemachine with input ${i}" $?
diff ${reference_output}${i}.txt ${output}${i}.txt || die "comparing ${output}${i}.txt" $?
done
for i in 12
do
${exe} -i ${input}${i}.txt -o ${output}${i}.txt || die "TestFWCoreFrameworkStatemachine with input ${i}" $?
diff ${reference_output}${i}.txt ${output}${i}.txt || die "comparing ${output}${i}.txt" $?
done
#testing exceptions
for i in 20 21 22 23
do
${exe} -i ${input}${i}.txt -o ${output}${i}.txt || die "TestFWCoreFrameworkStatemachine with input ${i}" $?
diff ${reference_output}${i}.txt ${output}${i}.txt || die "comparing ${output}${i}.txt" $?
done