qa: update 660 to generate index.html, fixing pcp-testsuite runs
[pcp.git] / qa / 488
blob5588da485d45a772a347b139bf6f4d3f6596db5e
1 #!/bin/sh
2 # PCP QA Test No. 488
3 # pmlogrewrite - delete cases
5 # Copyright (c) 2011 Ken McDonell. 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 pmlogrewrite >/dev/null 2>&1 || _notrun "pmlogrewrite not installed"
18 status=0 # success is the default!
19 $sudo rm -rf $tmp.* $seq.full
20 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
22 _filter()
24 sed \
25 -e "s;$tmp;TMP;g" \
26 -e "s/^\([+-][+-][+-] TMP\...t*\).*/\1/" \
27 -e '/pmResult dump/s/from .* numpmid/... numpmid/'
30 _cmp()
32 pminfo -a $1 -m >$tmp.in
33 pminfo -a $2 -m >$tmp.out
34 echo "--- pmns diffs ---"
35 diff -u $tmp.in $tmp.out | _filter
36 pmdumplog -z -a $1 | tee -a $seq.full >$tmp.in
37 pmdumplog -z -a $2 | tee -a $seq.full >$tmp.out
38 echo "--- pmdumplog diffs ---"
39 diff -u $tmp.in $tmp.out | _filter
42 # real QA test starts here
43 sed -e '/^#/d' <<End-of-File | while read arch_args spec
44 # archive[|arg1[|arg2[|...]]] spec
45 # metric delete
46 archives/src-rattle metric hinv.ncpu { delete }
47 archives/src-rattle metric hinv.ncpu { delete } metric hinv.ndisk { delete }
48 archives/src-rattle metric 1.*.* { delete }
49 archives/ace_v2 metric 40.*.* { delete } metric 1.25.* { delete }
50 archives/mirage indom 29.3 { iname "m-00" -> delete inst 33 -> delete }
51 End-of-File
53 echo | tee -a $seq.full
54 echo "$spec" >$tmp.config
55 echo "=== `cat $tmp.config` ===" | tee -a $seq.full
56 rm -f $tmp.new.*
57 pmlogrewrite -w -c $tmp.config `echo $arch_args | sed -e 's/|/ /g'` $tmp.new 2>&1 | _filter
58 if [ -f $tmp.new.0 ]
59 then
60 _cmp `echo $arch_args | sed -e 's/|.*//'` $tmp.new
62 done
64 # success, all done
65 exit