Replace stubs for qa tests 891 932 with the actual tests.
[pcp.git] / man / Check
blob3842f1f4bfe40f80b04b518f4d352389f8ea2b77
1 #!/bin/sh
3 # Check various man pages for consistency issues related to
4 # possible changes in the code base
7 tmp=/var/tmp/$$
8 trap "rm -f $tmp.*; exit 0" 0 1 2 3 15
10 # man pages that are not in the GNUmakefile will not be included
11 # in the build
12 for dir in man?
14 cd $dir
15 for file in *
17 [ "$file" = GNUmakefile ] && continue
18 if grep "[ ]$file" GNUmakefile >/dev/null
19 then
21 else
22 echo "$dir/$file: not in GNUmakefile"
24 done
25 cd ..
26 done
28 # completeness of PM_ERR codes in man3/pcpintro.3
30 if [ -x ../src/pmerr/pmerr ]
31 then
32 ../src/pmerr/pmerr -l
33 else
34 echo >&2 "Warning: using installed pmerr not newly built one ..."
35 pmerr -l
36 fi \
37 | sed \
38 -e 's/^-[0-9]*[ ]*//' \
39 -e 's/[ ].*//' \
40 -e '/^$/d' \
41 | sort >$tmp.codes
43 awk <man3/pcpintro.3 '
44 /^.TP/ { want = 1; next }
45 want == 1 && /^.B PM_ERR/ { print $2 }
46 { want = 0 }' \
47 | sort >$tmp.desc
49 comm -23 $tmp.codes $tmp.desc >$tmp.tmp
50 if [ -s $tmp.tmp ]
51 then
52 echo "Error codes defined but not documented in man3/pcpintro.3:"
53 sed -e 's/^/ /' $tmp.tmp
55 comm -13 $tmp.codes $tmp.desc >$tmp.tmp
56 if [ -s $tmp.tmp ]
57 then
58 echo "Error codes documented in man3/pcpintro.3 but not defined:"
59 sed -e 's/^/ /' $tmp.tmp
62 # references to Irix are probably needing to be retired ... other
63 # than the previously checked exceptions
65 grep -r -i irix man? \
66 | sed \
67 -e '/man5\/pmns.5:.*IRIX:[A-Z]/d' \
68 -e '/man1\/pcpintro.1:.*MacOSX, IRIX, AIX/d' \
69 -e '/man1\/pmie.1:.*\/SGI_Admin\/books\/PCP_IRIX\//d' \
70 -e '/man5\/pmns.5:#define IRIX 1/d'