File: CheckAllEdp

package info (click to toggle)
freefem++ 3.61.1+dfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 17,108 kB
  • sloc: cpp: 141,214; ansic: 28,664; sh: 4,925; makefile: 3,142; fortran: 1,171; perl: 844; awk: 290; php: 199; pascal: 41; f90: 32
file content (69 lines) | stat: -rwxr-xr-x 1,656 bytes parent folder | download | duplicates (3)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
  red='' # Red.
  grn='' # Green.
  lgn='' # Light green.
  blu='' # Blue.
  mgn='' # Magenta.
  std=''     # No color.

NL=0
NA=0
NX=0
NN=0
NO=0
NC=0
NF=0

cmm=$1;shift;
if [ $# -eq 0 ]; then
list=*.edp
elif  [ $# -gt  0 ]; then
list="$@"
fi
for i in $list
do
    case $i in
	all.edp|regtests.edp) 
	    echo  pass   $i;; 
	*)
	    ((NN++))
	    ( $cmm "$i" )2>&1 1>$i-out;
	    RES=$?
	    ((SIG=$RES%128));

	    ## error Compile error : Error load   # 1
	    ## error Compile error :
            ## Exec error : exec assert
	    ## Exec error :
	    errl=`grep 'error Compile error : Error load' $i-out`
	    errC=`grep 'error Compile error :' $i-out`
	    errX=`grep 'Exec error :' $i-out`
	    errA=`grep 'Exec error : exec assert' $i-out`
	  #  echo "$RES,$SIG,$errC,$errA."
	    if [ -n "$errl" ] ; then
		((NL++))
		MSG="${mgn} FAIL(load)        ${std}"
	    elif [ -n "$errC" ] ; then
		((NC++))
		MSG="${lgn} FAIL(Compile)     ${std}"
	    elif [ -n "$errA" -a  $SIG -ne 0 ] ; then
		((NA++))
		MSG="${blu} FAIL(Assert)      ${std}"
	    elif [ -n "$errX" -a  $SIG -ne 0 ] ; then
		((NX++))
		MSG="${mgn} FAIL(Exec)        ${std}"
	    elif [ $SIG -eq 0 ] ; then
		((NO++))
		MSG="${grn} OK  (Exec)        ${std}"
	    else
		MSG="${red} FAIL(signal)=$SIG ${std}"
		((NF++))
	    fi
	    echo $MSG  $cmm $i  >>$i-out
	    echo  $MSG  $cmm $i "( see $i-out )";
#	    echo  $MSG  $cmm $i "(see $i-out )" >>/tmp/list-ff-$$
	    ;;
    esac
done

echo "Nb Case $NN / ${grn}OK $NO / ${red} FAIL $NF / ${blu} Assert Error $NA/ ${lgn} Compile Error $NC  / ${mgn} load Error $NL / Exec Error $NX${std}"