Debian Codegraph @

function_test/Semantic_Analyser/run_test

raw symbols SCIP
1 #!/bin/bash
2
3 SCRIPTFLAGS=
4 while [ $# -gt 0 ]; do
5 case $1 in
6 "-coverage") SCRIPTFLAGS+=" -coverage"; shift 1 ;;
7 "-rt2") SCRIPTFLAGS=" -rt2"; shift 1 ;;
8 *) echo "Usage: $0 [-rt2] [-coverage]"; exit 1 ;;
9 esac
10 done
11
12 echo "Batch execution of SA tests: creating 1 report for each script file"
13 echo "You must have a symlink in this directory named perl and pointing to perl 5.6.0 or higher"
14
15 SCRIPTS="ASN_SA_1_TD ASN_SA_asn1adhoc_TD TTCN3_SA_1_TD TTCN3_SA_3_TD TTCN3_SA_4_TD TTCN3_SA_5_TD TTCN3_SA_6_TD TTCN3_SA_7_TD TTCN3_SA_9_TD TTCN3_SA_10_TD TTCN3_SA_ttcn3adhoc_TD TTCN3_SA_11_TD TTCN3_SA_13_TD"
16
17 #TODO: TTCN3_SA_12_TD is machine dependent, cannot be executed on any platform. Modify it to be machine independent, if it is possible!
18
19 for PREFIX in $SCRIPTS
20 do
21 echo "./perl ../Tools/SAtester.pl $SCRIPTFLAGS -log $PREFIX.report $PREFIX.script"
22 ./perl ../Tools/SAtester.pl $SCRIPTFLAGS -log "$PREFIX.report" "$PREFIX.script"
23 done
24
25 echo "Finished. Reports are generated with .report extension."
26
27 echo
28 echo "==============================================================="
29 echo "======================= total summary ========================="
30 echo "==============================================================="
31 echo
32 tail -v -n 11 *.report
33 # grep returns success if found; invert the return value
34 if egrep 'test cases: [1-9]' *.report | egrep -v 'PASSED|Total'
35 then echo WHOOPS; false
36 else true
37 fi