pmrep: fix archive end time reporting
[pcp.git] / qa / 797
blob92703982fd15cd7df7800f105a3fb28bca027b3b
1 #!/bin/sh
2 # PCP QA Test No. 797
3 # Try pmlogrewite with an archive containing derived metrics
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 $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 # real QA test starts here
26 echo "===511.2048.1 case ==="
27 cat <<End-of-File >$tmp.rewrite
28 metric 511.2048.1 {
29 pmid -> 510.2048.1
31 End-of-File
32 rm -f $tmp.0 $tmp.index $tmp.meta
33 pmlogrewrite -c $tmp.rewrite archives/log-derived $tmp 2>&1 | _filter
34 pmdumplog -z $tmp
36 echo
37 echo "===511.2048.* case ==="
38 cat <<End-of-File >$tmp.rewrite
39 metric 511.2048.* {
40 pmid -> 510.2048.*
42 End-of-File
43 rm -f $tmp.0 $tmp.index $tmp.meta
44 pmlogrewrite -c $tmp.rewrite archives/log-derived $tmp 2>&1 | _filter
45 pmdumplog -z $tmp
47 echo
48 echo "===511.*.* case ==="
49 cat <<End-of-File >$tmp.rewrite
50 metric 511.*.* {
51 pmid -> 510.*.*
53 End-of-File
54 rm -f $tmp.0 $tmp.index $tmp.meta
55 pmlogrewrite -c $tmp.rewrite archives/log-derived $tmp 2>&1 | _filter
56 pmdumplog -z $tmp
58 # success, all done
59 status=0
61 exit