summaryrefslogtreecommitdiff
path: root/qa/1007
blob: 6879d6dc68578a69a3a270dcde58bd338b2088da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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