Drop unused condition check
[pcp.git] / qa / 278
blob7894c5eb4aa1e7d65a6a60db1762eb18db5a19f1
1 #! /bin/sh
2 # PCP QA Test No. 278
3 # validate newhelp
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 filters
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 status=1 # failure is the default!
17 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
19 _bogus()
21 cat >>$2 <<End-of-File
22 @ $1 one line for $1
23 start of entry for $1
24 This is random boring text that pretends to describe
25 what on earth the metric $1 is used for.
27 There is no point to the words, just treat it as a boring diatribe.
28 There is no point to the words, just treat it as a boring diatribe.
29 There is no point to the words, just treat it as a boring diatribe.
30 There is no point to the words, just treat it as a boring diatribe.
31 There is no point to the words, just treat it as a boring diatribe.
33 AUDIT TAG $1
35 end of entry for $1
36 End-of-File
39 # real QA test starts here
41 for m in sample.long.one sample.long.ten sample.long.hundred sample.long.million sample.long.write_me
43 _bogus $m $tmp.1
44 done
46 for m in sample.longlong.one sample.longlong.ten sample.longlong.hundred sample.longlong.million sample.longlong.write_me
48 _bogus $m $tmp.2
49 done
51 for m in sample.float.one sample.float.ten sample.float.hundred sample.float.million sample.float.write_me
53 _bogus $m $tmp.3
54 done
56 for m in sample.double.one sample.double.ten sample.double.hundred sample.double.million sample.double.write_me
58 _bogus $m $tmp.4
59 done
61 for m in sample.string.null sample.string.hullo sample.string.write_me
63 _bogus $m $tmp.5
64 done
66 for m in sample.aggregate.null sample.aggregate.hullo sample.aggregate.write_me
68 _bogus $m $tmp.6
69 done
71 echo >$tmp.7
73 bytes=`cat $tmp.? | wc -c | sed -e 's/ //g'`
74 vlist="2"
76 for version in $vlist
78 for pass in 1 2
81 echo
82 echo "=== newhelp -v $version and pass $pass ==="
84 if newhelp -v $version -V -o $tmp $tmp.?
85 then
87 else
88 echo "Error: newhelp failed!"
89 exit
92 size=`wc -c <$tmp.pag | sed -e 's/ //g'`
93 if [ "$size" -lt "$bytes" ]
94 then
95 echo "Error: .pag file too small ($size < $bytes)"
96 ls -l $tmp.?
97 echo
98 ls -l $tmp.pag $tmp.dir
99 exit
102 echo "=== check text, expect no diff output ==="
103 for m in sample.long.hundred sample.longlong.million sample.float.one \
104 sample.double.ten sample.string.hullo sample.aggregate.null
106 echo $m:
107 echo >$tmp.check
108 _bogus $m $tmp.check
109 if chkhelp -v $version -HO $tmp $m >$tmp.out 2>&1
110 then
111 sed <$tmp.out \
112 -e '/^PMID/{
113 s/PMID [^ ]* /@ /
114 s/://
115 }' \
116 | diff - $tmp.check
117 else
118 cat $tmp.out
119 echo "Error: chkhelp failed!"
120 exit
122 done
123 done
124 done
126 # success, all done
127 status=0
128 exit