qa: update 660 to generate index.html, fixing pcp-testsuite runs
[pcp.git] / qa / 772
blob0bc5528d26baab132fa7205bf6b77f4e392c775e
1 #!/bin/sh
2 # PCP QA Test No. 772
3 # pmnsmerge -x checks
5 # Copyright (c) 2015 Ken McDonell. 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 status=1 # failure is the default!
17 $sudo rm -rf $tmp.* $seq.full
18 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
20 cat <<End-of-File >$tmp.root
21 root {
22 foo 1:2:3
23 dyno 4:*:*
24 bar
26 bar {
27 bar
28 one 7:0:1
30 bar.bar {
31 bar
32 two 7:0:2
34 bar.bar.bar {
35 three 7:0:3
37 End-of-File
39 cat <<End-of-File >$tmp.root2
40 root {
41 black
42 white
44 black {
45 sheep 7:0:2
47 white {
48 dyno 4:*:*
50 End-of-File
52 cat <<End-of-File >$tmp.root3
53 root {
54 white
56 white {
57 dyno 4:*:*
59 End-of-File
61 _filter()
63 sed \
64 -e "s@$tmp@TMP@g" \
65 # end
68 # real QA test starts here
69 echo "no dups"
70 rm -f $tmp.tmp
71 pmnsmerge $tmp.root $tmp.tmp >$tmp.out 2>&1
72 xit=$?
73 _filter <$tmp.out
74 echo "exit status: $xit"
75 not=''
76 [ -f $tmp.tmp ] || not=' not'
77 echo "output PMNS$not created"
79 echo
80 echo "no dups -x"
81 rm -f $tmp.tmp
82 pmnsmerge -x $tmp.root $tmp.tmp >$tmp.out 2>&1
83 xit=$?
84 _filter <$tmp.out
85 echo "exit status: $xit"
86 not=''
87 [ -f $tmp.tmp ] || not=' not'
88 echo "output PMNS$not created"
90 echo
91 echo "dups"
92 rm -f $tmp.tmp
93 pmnsmerge $tmp.root $tmp.root2 $tmp.tmp >$tmp.out 2>&1
94 xit=$?
95 _filter <$tmp.out
96 echo "exit status: $xit"
97 not=''
98 [ -f $tmp.tmp ] || not=' not'
99 echo "output PMNS$not created"
101 echo
102 echo "dups - order reversed"
103 rm -f $tmp.tmp
104 pmnsmerge $tmp.root $tmp.root3 $tmp.tmp >$tmp.out 2>&1
105 xit=$?
106 _filter <$tmp.out
107 echo "exit status: $xit"
108 not=''
109 [ -f $tmp.tmp ] || not=' not'
110 echo "output PMNS$not created"
112 echo
113 echo "dups -x"
114 rm -f $tmp.tmp
115 pmnsmerge -x $tmp.root $tmp.root2 $tmp.tmp >$tmp.out 2>&1
116 xit=$?
117 _filter <$tmp.out
118 echo "exit status: $xit"
119 not=''
120 [ -f $tmp.tmp ] || not=' not'
121 echo "output PMNS$not created"
123 echo
124 echo "dups -x - order reversed"
125 rm -f $tmp.tmp
126 pmnsmerge -x $tmp.root $tmp.root3 $tmp.tmp >$tmp.out 2>&1
127 xit=$?
128 _filter <$tmp.out
129 echo "exit status: $xit"
130 not=''
131 [ -f $tmp.tmp ] || not=' not'
132 echo "output PMNS$not created"
134 echo
135 echo "dups - 3 input files"
136 rm -f $tmp.tmp
137 pmnsmerge $tmp.root $tmp.root2 $tmp.root3 $tmp.tmp >$tmp.out 2>&1
138 xit=$?
139 _filter <$tmp.out
140 echo "exit status: $xit"
141 not=''
142 [ -f $tmp.tmp ] || not=' not'
143 echo "output PMNS$not created"
144 cp $tmp.tmp $tmp.merged
146 echo
147 echo "merged"
148 rm -f $tmp.tmp
149 pmnsmerge $tmp.merged $tmp.tmp >$tmp.out 2>&1
150 xit=$?
151 _filter <$tmp.out
152 echo "exit status: $xit"
153 not=''
154 [ -f $tmp.tmp ] || not=' not'
155 echo "output PMNS$not created"
157 echo
158 echo "merged -x"
159 rm -f $tmp.tmp
160 pmnsmerge -x $tmp.merged $tmp.tmp >$tmp.out 2>&1
161 xit=$?
162 _filter <$tmp.out
163 echo "exit status: $xit"
164 not=''
165 [ -f $tmp.tmp ] || not=' not'
166 echo "output PMNS$not created"
168 # success, all done
169 status=0
171 exit