python api: fix syntax error in recent context changes
[pcp.git] / qa / 360
blobc710088cc0527552b34033e204916dd69bf5d6a1
1 #!/bin/sh
2 # PCP QA Test No. 360
3 # Remote host tests split off from 055
5 # Copyright (c) 2010 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=0 # success is the default!
17 $sudo rm -rf $tmp.* $seq.full
18 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
20 ./getpmcdhosts -L -v 'pcp>=2' -n 2 -a sample 2>$tmp.err \
21 | sed >$tmp.config \
22 -e 's/^/ /' \
23 -e "s/ \([^ ][^ ]*\)/ :'\1'/g" \
24 -e 's/^ /hosts = "/' \
25 -e 's/$/";/'
26 [ -s $tmp.err ] && _notrun `cat $tmp.err`
28 # here are the exercises
29 cat >>$tmp.config << \EOF
30 delta = 2 sec;
32 // host domain exercises
33 host_fetch = sample.long.ten $hosts;
34 host_neg = -sample.long.ten $hosts;
35 host_sum = sum_host sample.long.ten $hosts;
36 host_avg = avg_host sample.long.ten $hosts;
37 host_max = max_host sample.long.ten $hosts;
38 host_min = min_host sample.long.ten $hosts;
39 host_count = count_host sample.long.ten $hosts >= 10;
40 host_add1 = sample.long.ten $hosts + sample.long.ten $hosts;
41 host_add2 = sample.long.ten $hosts + 1;
42 host_add3 = 1 + sample.long.ten $hosts;
43 host_gt1 = sample.long.ten $hosts + 1 > sample.long.ten $hosts;
44 host_gt2 = sample.long.ten $hosts > 11;
46 // multiple domains
47 multi3 = max_sample sum_host avg_inst sample.bin $hosts @0..2;
48 multi4 = sum_host max_sample avg_inst sample.bin $hosts @0..2;
49 multi5 = avg_host min_sample count_inst sample.bin $hosts @0..2 > 400;
51 EOF
53 cat $tmp.config >>$seq.full
55 # real QA test starts here
56 pmie -T 10 -v $tmp.config >$tmp.out 2>$tmp.err
57 ( echo; echo "=== err ==="; cat $tmp.err ) >>$seq.full
58 cat $tmp.err | _show_pmie_exit
59 ( echo; echo "=== out ==="; cat $tmp.out ) >>$seq.full
60 cat $tmp.out | LC_COLLATE=POSIX sort
62 # success, all done
63 exit