summaryrefslogtreecommitdiff
path: root/qa/1007
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/1007
downloadpcp-debian.tar.gz
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/1007')
-rwxr-xr-xqa/100755
1 files changed, 55 insertions, 0 deletions
diff --git a/qa/1007 b/qa/1007
new file mode 100755
index 0000000..6879d6d
--- /dev/null
+++ b/qa/1007
@@ -0,0 +1,55 @@
+#!/bin/sh
+# PCP QA Test No. 1007
+# Check handling of "tab" keyword in configuration language.
+#
+seq=`basename $0`
+echo "QA output created by $seq"
+. ./common.qt
+
+_check_display
+which pmchart >/dev/null 2>&1 || _notrun "pmchart not installed"
+
+status=0 # success is the default!
+trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+
+# real QA test starts here
+echo "=== Valid, no error ==="
+cat <<End-of-File | pmchart -c - -C 2>&1 | _filter_views
+#kmchart
+version 1
+tab "1" points 300 samples 300
+chart title "Tab Test" style stacking
+ plot legend "User" color #2d2de2 metric kernel.all.cpu.user
+tab "2" points 0 samples 20
+tab "3" points 20 samples 200
+End-of-File
+
+echo "=== Bad syntax, no tab specification ==="
+cat <<End-of-File | pmchart -c - -C 2>&1 | _filter_views
+#kmchart
+version 1
+tab
+End-of-File
+
+echo "=== Bad syntax, no point keyword ==="
+cat <<End-of-File | pmchart -c - -C 2>&1 | _filter_views
+#kmchart
+version 1
+tab "Indexing Host" 300
+End-of-File
+
+echo "=== Bad syntax, no point value ==="
+cat <<End-of-File | pmchart -c - -C 2>&1 | _filter_views
+#kmchart
+version 1
+tab "DB" points
+End-of-File
+
+echo "=== Bad syntax, no sample value ==="
+cat <<End-of-File | pmchart -c - -C 2>&1 | _filter_views
+#kmchart
+version 1
+tab "App" points 34 samples
+End-of-File
+
+exit