3 # check out trivial PMDA
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard filters
16 signal
=$PCP_BINADM_DIR/pmsignal
18 install_on_cleanup
=false
19 pminfo trivial
>/dev
/null
2>&1 && install_on_cleanup
=true
24 if $sudo $PCP_MAKE_PROG >$tmp.out
2>&1
29 echo "Arrgh, cleanup make failed"
33 _restore_config
$PCP_VAR_DIR/pmns
/root
35 if diff $PCP_PMCDCONF_PATH.
$seq $PCP_PMCDCONF_PATH > /dev
/null
2>&1
37 _restore_config
$PCP_PMCDCONF_PATH
41 if $install_on_cleanup
43 # do a default install which ensures the pmns and any views are installed
44 $sudo .
/Install
</dev
/null
>/dev
/null
2>&1
46 # leave the landscape clean like you found it
47 $sudo .
/Remove
>/dev
/null
2>&1
50 # PMDA may have been installed differently to default. As everything is
51 # installed we can use the old pmcd.conf file to restore state.
53 if diff $PCP_PMCDCONF_PATH.
$seq $PCP_PMCDCONF_PATH > /dev
/null
2>&1
55 _restore_config
$PCP_PMCDCONF_PATH
57 _restore_config
$PCP_PMCDCONF_PATH
58 $sudo $signal -a -s HUP pmcd
66 trap "_cleanup" 0 1 2 3 15
73 # real QA test starts here
76 if [ ! -d $home/$iam ]
78 echo "Where is $home/$iam?"
84 # copy some config file to restore state later.
85 _save_config
$PCP_PMCDCONF_PATH
86 _save_config
$PCP_VAR_DIR/pmns
/root
88 if $sudo $PCP_MAKE_PROG clobber
>$tmp.out
2>&1
93 echo "Arrgh, make clobber failed"
97 if $sudo $PCP_MAKE_PROG >$tmp.out
2>&1
102 echo "Arrgh, make failed"
106 # start from a known starting point
107 $sudo .
/Remove
>/dev
/null
2>&1
110 echo "=== pipe daemon agent ==="
111 $sudo .
/Remove
>$tmp.out
2>&1
114 pipe' |
$sudo .
/Install
>>$tmp.out
2>&1
122 echo "... failed! ... here is the Install log ..."
127 echo "=== Unix socket daemon agent ==="
128 $sudo .
/Remove
>$tmp.out
2>&1
133 '"$tmp.fifo" |
$sudo .
/Install
>>$tmp.out
2>&1
138 '"$tmp.fifo" |
$sudo .
/Install
>>$tmp.out
2>&1
146 echo "... failed! ... here is the Install log ..."
151 echo "=== Internet socket daemon agent ==="
152 $sudo .
/Remove
>$tmp.out
2>&1
154 # pick a tcp port that is not in use
156 port
=`_get_port tcp 5670 5689`
159 echo "Arrgh ... no free TCP port in the range 5670 ... 5689"
167 '$port |
$sudo .
/Install
>>$tmp.out
2>&1
169 # use next port this time
170 port
=`expr $port + 1`
176 '$port |
$sudo .
/Install
>>$tmp.out
2>&1
184 echo "... failed! ... here is the Install log ..."
189 echo "=== dso agent ==="
190 $sudo .
/Remove
>$tmp.out
2>&1
192 dso' |
$sudo .
/Install
>>$tmp.out
2>&1
194 dso' |
$sudo .
/Install
>>$tmp.out
2>&1
202 echo "... failed! ... here is the Install log ..."
206 $sudo .
/Remove
>$tmp.out
2>&1