pmrep: update TODO, man page
[pcp.git] / qa / 1050
blob3063dd7c0b13a2e20ac0cc04e96fd9efca8ce136
1 #! /bin/sh
2 # PCP QA Test No. 1050 (formerly 553)
3 # check line length in pmieconf default rules
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 which pmieconf >/dev/null 2>&1 || _notrun "No pmieconf binary installed"
18 status=1 # failure is the default!
19 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
21 _length_check()
23 sed -e 's/ / /g' \
24 | $PCP_AWK_PROG '
25 $1 == "rule:" { rule = $0 }
27 line = $0
28 if (length(line) > '$1') {
29 print rule
30 print "text is too long: "
31 print
36 # real QA test starts here
37 echo
38 echo "=== Checking help text ==="
39 pmieconf -f $tmp.pmie help all | _length_check 80
40 echo
41 echo "=== Checking predicate ==="
42 # (increased from 80 to 96 because of the white space to the
43 # left of the real prodicate text, in pmieconf output).
44 pmieconf -f $tmp.pmie list all predicate | _length_check 96
46 # success, all done
47 status=0
48 exit