File: check.app.ok

package info (click to toggle)
pcp 7.1.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 252,748 kB
  • sloc: ansic: 1,483,656; sh: 182,366; xml: 160,462; cpp: 83,813; python: 24,980; perl: 18,327; yacc: 6,877; lex: 2,864; makefile: 2,738; awk: 165; fortran: 60; java: 52
file content (62 lines) | stat: -rwxr-xr-x 968 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
#!/bin/sh
#
# When QA apps are changed, this script
# (a) remakes the app, and checks make status
# (b) finds and runs all the ../[0-9]* scripts that run the app
#

sts=1
tmp=/var/tmp/check_app_ok_$$
trap "rm -f $tmp.*; exit \$sts" 0 1 2 3 15

for app
do
    cd src

    echo -n "$app:"
    if [ -x "$app" ]
    then
	rm "$app"
	if make "$app" >$tmp.out 2>&1
	then
	    :
	else
	    echo
	    cat $tmp.out
	    echo "Arrgh: make $app failed!"
	    exit
	fi
    fi
    if [ -x "$app" ]
    then
	:
    else
	echo
	echo "Arrgh: failed to remake $app executable!"
	exit
    fi

    cd ..

    seqs=`grep -E -l "src/$app( |$)" [0-9][0-9]*[0-9] | tr '\012' ' ' | sed -e 's/  *$//'`

    if [ -z "$seqs" ]
    then
	echo
	echo "Warning: cannot find $app in any QA tests"
	continue
    fi
    echo "(tests: $seqs)"

    ./check -l $seqs >$tmp.out 2>&1

    sed <$tmp.out \
    	-e '/^PMDA probe:/d' \
	-e '/^[0-9][0-9]* [0-9][0-9]*s \.\.\.$/d' \
    # end

done

sts=0
exit