pmrep: fix archive end time reporting
[pcp.git] / qa / 634
blob84e521f798474781add18f49e57328c930d81969
1 #! /bin/sh
2 # PCP QA Test No. 634
3 # pmval timezone problem, #825316
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 environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 status=0 # success is the default!
17 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
19 # real QA test starts here
20 echo "time zone from archive ..."
21 pmval -t 5 -z -a archives/gmt-boring hinv.ncpu 2>&1 | tee $tmp.out
23 echo
24 echo "GMT via -Z ..."
25 pmval -t 5 -Z GMT -a archives/gmt-boring hinv.ncpu
27 echo
28 echo "GMT via default local timezone ..."
29 TZ=GMT pmval -t 5 -a archives/gmt-boring hinv.ncpu
31 echo
32 echo "Default timezone ... should be different to -z ..."
33 pmval -t 5 -a archives/gmt-boring hinv.ncpu >$tmp.default 2>&1
35 if diff $tmp.default $tmp.out >/dev/null
36 then
37 echo "No differences ... you have the bug!"
38 status=1
39 else
40 echo "Different, as expected"
43 # all done
44 exit