Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 907
blob5ad4c5fd33b4131eb3e2bbd104fbc87fa90f5dc6
1 #!/bin/sh
2 # PCP QA Test No. 907
3 # pmlogextract with schizo archives
5 # Copyright (c) 2015 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 status=1 # failure is the default!
17 $sudo rm -rf $tmp.* $seq.full
18 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
20 _filter()
22 sed -e "s@$tmp@TMP@g"
25 # \
26 # schizo.data3 schizo.data4
28 # real QA test starts here
29 for metric in sample.bin sample.long.hundred sample.ulonglong.hundred \
30 schizo.version schizo.mumble schizo.foo schizo.data1 schizo.data2
32 echo "=== $metric ==="
33 xtra=''
34 [ "$metric" = schizo.mumble ] && xtra=schizo.fumble
35 echo "$metric" >$tmp.config
36 rm -f $tmp.xtract.*
37 if pmlogextract -c $tmp.config archives/schizo-B $tmp.xtract >$tmp.err 2>&1
38 then
39 echo "OK, metrics from intermediate archive ..."
40 pmdumplog -z $tmp.xtract $metric
41 else
42 _filter <$tmp.err
43 echo "intermediate pmlogextract failed!"
44 continue
46 rm -f $tmp.out.*
47 if pmlogextract archives/schizo-A $tmp.xtract $tmp.out >$tmp.err 2>&1
48 then
49 echo "OK, metrics from final archive ..."
50 pmdumplog -a -z $tmp.out $metric $xtra
51 else
52 _filter <$tmp.err
53 echo "final pmlogextract failed"
55 done
57 # success, all done
58 status=0
60 exit