qa: update 660 to generate index.html, fixing pcp-testsuite runs
[pcp.git] / qa / 1046
blob8063a93d671ad9496668e06d68e1ffe3c482e560
1 #! /bin/sh
2 # PCP QA Test No. 1046 (formerly 527)
3 # exercise pmieconf global parameters
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 which pmieconf >/dev/null 2>&1 || _notrun "No pmieconf binary installed"
18 status=1 # failure is the default!
19 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
21 _filter()
23 $PCP_AWK_PROG '/delta = ([0-9]+)/ { print $(NF-2), $(NF-1), $NF }'
26 # real QA test starts here
27 cat > $tmp.pmie <<EOF
28 // pmieconf-pmie 1 ./pconf
29 // end
30 EOF
32 echo
33 echo "=== first, set global delta"
34 pmieconf -r ./pconf -f $tmp.pmie m global delta 120
35 head -3 $tmp.pmie
37 echo
38 echo "=== now change cpu groups delta"
39 pmieconf -r ./pconf -f $tmp.pmie modify cpu delta 450
40 head -9 $tmp.pmie
42 echo
43 echo "=== now print out some deltas"
44 # note use fgrep in case of bogus double delta
45 echo o global
46 pmieconf -r ./pconf -f $tmp.pmie l global | _filter
47 echo o memory
48 pmieconf -r ./pconf -f $tmp.pmie l memory | _filter
49 echo o cpu
50 pmieconf -r ./pconf -f $tmp.pmie l cpu | _filter
52 echo
53 echo "=== change global again"
54 pmieconf -r ./pconf -f $tmp.pmie m global delta 60
55 head -9 $tmp.pmie
57 echo
58 echo "=== print out the deltas"
59 echo o global
60 pmieconf -r ./pconf -f $tmp.pmie l global | _filter
61 echo o memory
62 pmieconf -r ./pconf -f $tmp.pmie l memory | _filter
63 echo o cpu
64 pmieconf -r ./pconf -f $tmp.pmie l cpu | _filter
66 echo
67 echo "=== lconf is in $seq.full ==="
68 echo
69 cp $tmp.pmie $seq.full
71 # debug check ... someone's clobbering pconf
73 if `which git >/dev/null 2>&1`
74 then
75 if git config --get remote.origin.url >/dev/null
76 then
77 # assume we're in a git repository, but may be older version of
78 # git (so -s does not work)
79 git status | grep pconf
83 # success, all done
84 status=0
85 exit