qa: update 660 to generate index.html, fixing pcp-testsuite runs
[pcp.git] / qa / 484
blob0a7f06a018387858f83285edfdfd475b63120a6e
1 #!/bin/sh
2 # PCP QA Test No. 484
3 # check pmlogrewrite archive copying (no config)
5 # Copyright (c) 2011 Ken McDonell. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
12 # get standard environment, filters and checks
13 . ./common.product
14 . ./common.filter
15 . ./common.check
17 which pmlogrewrite >/dev/null 2>&1 || _notrun "pmlogrewrite not installed"
19 status=0 # success is the default!
20 $sudo rm -rf $tmp.* $seq.full
21 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
23 _filter()
25 sed \
26 -e "s;$tmp;TMP;g" \
27 -e "s/^\([+-][+-][+-] TMP\...t*\).*/\1/"
30 _cmp()
32 for file in $1.*
34 ls -l $file $2`echo $file | sed -e "s;$1;;"` >>$seq.full
35 done
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
44 # Notes
46 # archives/mirage ... diffs reflect semantically acceptable differences
48 for arch in archives/ok-foo archives/541380_v2 archives/mirage tmparch/bigbin \
49 archives/ok-mv-foo archives/mirage-1 archives/mirage-2 tmparch/gap \
50 tmparch/gap2 '-Dall archives/ok-foo'
52 echo | tee -a $seq.full
53 echo "=== $arch ===" | tee -a $seq.full
54 rm -f $tmp.new.*
55 pmlogrewrite -w -Dappl0 $arch $tmp.new 2>$tmp.err | _filter
56 cat $tmp.err >>$seq.full
57 # strip any command line options preceding the archive basename
58 arch=`echo $arch | sed -e 's/.* //'`
59 _cmp $arch $tmp.new
60 done
62 # success, all done
63 exit