pmrep: fix archive end time reporting
[pcp.git] / qa / 597
blob716c5de5f3f6ede8b7e9491603806a36ac7f63b6
1 #! /bin/sh
2 # PCP QA Test No. 597
3 # Install/Remove of shping PMDA
5 # Copyright (c) 2015 Red Hat.
6 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 seq=`basename $0`
10 echo "QA output created by $seq"
12 # get standard filters
13 . ./common.product
14 . ./common.filter
15 . ./common.check
17 [ -f $PCP_PMDAS_DIR/shping/pmdashping ] || _notrun "shping pmda not installed"
18 which nslookup >/dev/null 2>&1 || _notrun "nslookup is not installed"
20 _cleanup()
22 _restore_pmda_install $iam
23 $sudo rm -f $tmp.*
24 exit $status
27 _filter()
29 $PCP_AWK_PROG '
30 /--- end \.\/sample\.conf ---/ { skip = 0 }
31 skip == 0 { print }
32 /--- start \.\/sample\.conf ---/{ print "[deleted]"; skip = 1 }
36 iam=shping
37 status=1
38 trap "_cleanup" 0 1 2 3 15
40 # real QA test starts here
41 _prepare_pmda_install $iam
43 echo
44 echo "=== default $iam agent installation ==="
45 $sudo ./Remove > $tmp.out 2>&1
46 $sudo ./Install </dev/null >>$tmp.out 2>&1
47 _filter_pmda_install <$tmp.out | _filter
49 if pminfo -v $iam
50 then
52 else
53 echo "... failed! ... here is the Install log ..."
54 cat $tmp.out
57 echo
58 echo "=== remove $iam agent ==="
59 $sudo ./Remove >$tmp.out 2>&1
60 _filter_pmda_remove <$tmp.out
62 status=0
63 exit