Project

General

Profile

« Previous | Next » 

Revision d119be37

Added by LĂ©lio Brun over 2 years ago

fix test script

View differences:

offline_tests/test.sh
16 16
FRAMA_C=frama-c
17 17

  
18 18
# max length of file names
19
M=0
19 20
S=0
20 21
for f in $LUS_FILES
21 22
do
23
    M=$(( M + 1 ))
22 24
    if [ "${#f}" -gt "$S" ]; then
23 25
        S=${#f}
24 26
    fi
......
31 33
    KO=0
32 34
    for f in $LUS_FILES
33 35
    do
34
        printf "${normal}%-${S}s" "$f"
35 36
        N=$(( N + 1 ))
37
        printf "%3.0f%% ${normal}%-${S}s" "$(((100 * N)/M))" "$f"
36 38
        if $LUSTREC -acsl-spec "$f" >/dev/null 2>/tmp/err; then
37 39
            OK=$(( OK + 1 ))
38 40
            CHECK="${green}OK${normal}"
......
44 46
        printf " %b\n" "${CHECK}"
45 47
    done
46 48
    printf "\n${normal}OK: ${green}%d${normal} (${red}%d${normal}) / %d\n\n"\
47
        "${OK}" "${KO}" "${N}"
49
        "${OK}" "${KO}" "${M}"
48 50
}
49 51

  
50 52
verif() {
......
54 56
    KO=0
55 57
    for f in *.c
56 58
    do
57
        printf "${normal}%-${S}s" "$f"
59
        N=$(( N + 1 ))
60
        printf "%3.0f%% ${normal}%-${S}s" "$(((100 * N)/M))" "$f"
58 61
        if $FRAMA_C $FRAMA_C_ARGS "$f" > /tmp/log; then
59 62
            sed -n '/Proved goals/{N;N;N;N;p;q}' /tmp/log > "$f".log
60 63
            OK=$(( OK + 1 ))
......
68 71
        printf " %b\n" "${CHECK}"
69 72
    done
70 73
    printf "\n${normal}OK: ${green}%d${normal} (${red}%d${normal}) / %d\n\n"\
71
        "${OK}" "${KO}" "${N}"
74
        "${OK}" "${KO}" "${M}"
72 75
}
73 76

  
74 77
compile

Also available in: Unified diff