pmrep: fix archive end time reporting
[pcp.git] / qa / 560
blobedd3fc9589b31271ed21620e52a5549a49dbf99c
1 #!/bin/sh
2 # PCP QA Test No. 560
3 # #681487 error handling in pmdaproc.sh dialogs
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 [ -d $PCP_PMDAS_DIR/simple ] || _notrun "simple PMDA directory is not installed"
18 status=1 # failure is the default!
19 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
21 # real QA test starts here
22 cd $PCP_PMDAS_DIR/simple
24 unset ROOT MAKEFLAGS
26 $sudo $PCP_MAKE_PROG clobber >/dev/null 2>&1
27 $sudo $PCP_MAKE_PROG >/dev/null 2>&1
29 _filter_make()
31 sed \
32 -e '/In function .vpmprintf./d' \
33 -e '/warning: the use of .tempnam./d' \
34 -e '/make: Nothing to be done/d'
37 cat <<End-of-File | $sudo ./Install -e >$tmp.out 2>&1
38 foo
39 both
40 foo
41 daemon
42 foo
43 socket
44 foo
45 Unix
47 Internet
49 End-of-File
51 sed <$tmp.out \
52 -e 's/or perl //g' \
53 -e 's/or python //g' \
54 -e 's/daemon or dso,/"daemon" or "dso",/g' \
55 | _filter_pmda_install \
56 | _filter_make
58 echo "in \$PCP_PMCDCONF_PATH ..."
59 sed -n "/^simple/s;$PCP_PMDAS_DIR;\$PCP_PMDAS_DIR;p" <$PCP_PMCDCONF_PATH
61 $sudo ./Remove
63 echo
64 if $sudo $PCP_MAKE_PROG >$tmp.tmp 2>$tmp.err
65 then
66 cat $tmp.err | _filter_make
67 else
68 cat $tmp.tmp
69 echo "make prior to Install failed!"
71 $sudo ./Install </dev/null >$tmp.out 2>&1
72 grep 'Check' $tmp.out
74 # success, all done
75 status=0
76 exit