summaryrefslogtreecommitdiff
path: root/qa/1049
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-10-26 12:33:50 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-10-26 12:33:50 +0400
commit47e6e7c84f008a53061e661f31ae96629bc694ef (patch)
tree648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /qa/1049
downloadpcp-47e6e7c84f008a53061e661f31ae96629bc694ef.tar.gz
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/1049')
-rwxr-xr-xqa/104969
1 files changed, 69 insertions, 0 deletions
diff --git a/qa/1049 b/qa/1049
new file mode 100755
index 0000000..41b9483
--- /dev/null
+++ b/qa/1049
@@ -0,0 +1,69 @@
+#! /bin/sh
+# PCP QA Test No. 1049 (formerly 552)
+# make sure that installed pmie rule files are syntactically OK.
+#
+# Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
+#
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+# get standard environment, filters and checks
+. ./common.product
+. ./common.filter
+. ./common.check
+. ./localconfig
+
+which pmieconf >/dev/null 2>&1 || _notrun "No pmieconf binary installed"
+
+status=1 # failure is the default!
+username=`id -u -n`
+trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+
+cat >$tmp.cmd <<EOF
+modify all enabled yes
+modify shping enabled no
+EOF
+
+# TODO - revisit these lists periodically to see what has changed
+#
+if [ $PCP_PLATFORM = irix ]
+then
+ # Not all metrics are available in IRIX, so skip the associated
+ # rules
+ cat >>$tmp.cmd <<EOF
+modify espping enabled no
+modify environ enabled no
+modify xvm enabled no
+EOF
+else
+ # Some metrics unavailable by default, so skip the associated rules
+ #
+ cat >>$tmp.cmd <<EOF
+modify cisco enabled no
+EOF
+fi
+
+# real QA test starts here
+echo "running pmieconf with default rules..."
+( cat $tmp.cmd; echo quit ) | pmieconf -f $tmp.eek
+echo "status=$?"
+
+echo "running pmie..."
+pmieargs="-C"
+id pcp >/dev/null 2>&1 && pmieargs="$pmieargs -U $username"
+pmie $pmieargs -c $tmp.eek -l $tmp.pmielog
+echo "status=$?"
+echo "pmie log file..."
+cat $tmp.pmielog | _filter_pmie_log
+
+echo "--- pmieconf input ---" >$seq.full
+cat $tmp.cmd >>$seq.full
+echo "--- pmie input ---" >>$seq.full
+cat $tmp.eek >>$seq.full
+echo "--- pmie output ---" >>$seq.full
+cat $tmp.pmielog >>$seq.full
+
+# success, all done
+status=0
+exit