Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 1012
blob253545c447958427143961a87633bf83b0c8727e
1 #!/bin/sh
2 # PCP QA Test No. 1012
3 # Test unit scale conversion in pmdumptext
5 seq=`basename $0`
6 echo "QA output created by $seq"
8 status=1 # failure is the default!
9 . ./common.qt
10 trap "_cleanup_qt; exit \$status" 0 1 2 3 15
12 which pmdumptext >/dev/null 2>&1 || _notrun "pmdumptext not installed"
14 _filter()
16 $PCP_AWK_PROG '
17 $1 == "TIME-STAMP" && $2 != "?" { val = $2;
18 if (val < 1.05 && val > 0.95) $2 = 1.0;
19 printf("%s %5.2f\n", $1, $2); next }
20 { print }'
23 # real QA test starts here
24 pmdumptext -imu -w 7 -s 3 -f 'TIME-STAMP' sample.milliseconds | _filter 2>&1
26 # success, all done
27 status=0
28 exit