##// END OF EJS Templates
test-run-tests.t: add extra data to tests for keyword tests...
Augie Fackler -
r21995:20bfcb48 default
parent child Browse files
Show More
@@ -1,223 +1,249 b''
1 1 This file tests the behavior of run-tests.py itself.
2 2
3 3 Smoke test
4 4 ============
5 5
6 6 $ $TESTDIR/run-tests.py
7 7
8 8 # Ran 0 tests, 0 skipped, 0 warned, 0 failed.
9 9
10 10 a succesful test
11 11 =======================
12 12
13 13 $ cat > test-success.t << EOF
14 14 > $ echo babar
15 15 > babar
16 > $ echo xyzzy
17 > xyzzy
16 18 > EOF
17 19
18 20 $ $TESTDIR/run-tests.py --with-hg=`which hg`
19 21 .
20 22 # Ran 1 tests, 0 skipped, 0 warned, 0 failed.
21 23
22 24 failing test
23 25 ==================
24 26
25 27 $ cat > test-failure.t << EOF
26 28 > $ echo babar
27 29 > rataxes
30 > This is a noop statement so that
31 > this test is still more bytes than success.
28 32 > EOF
29 33
30 34 $ $TESTDIR/run-tests.py --with-hg=`which hg`
31 35
32 36 --- $TESTTMP/test-failure.t
33 37 +++ $TESTTMP/test-failure.t.err
34 @@ -1,2 +1,2 @@
38 @@ -1,4 +1,4 @@
35 39 $ echo babar
36 40 - rataxes
37 41 + babar
42 This is a noop statement so that
43 this test is still more bytes than success.
38 44
39 45 ERROR: test-failure.t output changed
40 46 !.
41 47 Failed test-failure.t: output changed
42 48 # Ran 2 tests, 0 skipped, 0 warned, 1 failed.
43 49 python hash seed: * (glob)
44 50 [1]
45 51
46 52 test for --retest
47 53 ====================
48 54
49 55 $ $TESTDIR/run-tests.py --with-hg=`which hg` --retest
50 56
51 57 --- $TESTTMP/test-failure.t
52 58 +++ $TESTTMP/test-failure.t.err
53 @@ -1,2 +1,2 @@
59 @@ -1,4 +1,4 @@
54 60 $ echo babar
55 61 - rataxes
56 62 + babar
63 This is a noop statement so that
64 this test is still more bytes than success.
57 65
58 66 ERROR: test-failure.t output changed
59 67 !
60 68 Failed test-failure.t: output changed
61 69 # Ran 1 tests, 1 skipped, 0 warned, 1 failed.
62 70 python hash seed: * (glob)
63 71 [1]
64 72
65 73 Selecting Tests To Run
66 74 ======================
67 75
68 76 successful
69 77
70 78 $ $TESTDIR/run-tests.py --with-hg=`which hg` test-success.t
71 79 .
72 80 # Ran 1 tests, 0 skipped, 0 warned, 0 failed.
73 81
74 82 failed
75 83
76 84 $ $TESTDIR/run-tests.py --with-hg=`which hg` test-failure.t
77 85
78 86 --- $TESTTMP/test-failure.t
79 87 +++ $TESTTMP/test-failure.t.err
80 @@ -1,2 +1,2 @@
88 @@ -1,4 +1,4 @@
81 89 $ echo babar
82 90 - rataxes
83 91 + babar
92 This is a noop statement so that
93 this test is still more bytes than success.
84 94
85 95 ERROR: test-failure.t output changed
86 96 !
87 97 Failed test-failure.t: output changed
88 98 # Ran 1 tests, 0 skipped, 0 warned, 1 failed.
89 99 python hash seed: * (glob)
90 100 [1]
91 101
92 102 Running In Debug Mode
93 103 ======================
94 104
95 105 $ $TESTDIR/run-tests.py --with-hg=`which hg` --debug
96 106 + echo SALT* 0 0 (glob)
97 107 SALT* 0 0 (glob)
98 108 + echo babar
99 109 babar
100 + echo SALT* 2 0 (glob)
101 SALT* 2 0 (glob)
110 + echo SALT* 4 0 (glob)
111 SALT* 4 0 (glob)
102 112 .+ echo SALT* 0 0 (glob)
103 113 SALT* 0 0 (glob)
104 114 + echo babar
105 115 babar
106 116 + echo SALT* 2 0 (glob)
107 117 SALT* 2 0 (glob)
118 + echo xyzzy
119 xyzzy
120 + echo SALT* 4 0 (glob)
121 SALT* 4 0 (glob)
108 122 .
109 123 # Ran 2 tests, 0 skipped, 0 warned, 0 failed.
110 124
111 125 Parallel runs
112 126 ==============
113 127
114 128 (duplicate the failing test to get predictable output)
115 129 $ cp test-failure.t test-failure-copy.t
116 130
117 131 $ $TESTDIR/run-tests.py --with-hg=`which hg` --jobs 2 test-failure*.t
118 132
119 133 --- $TESTTMP/test-failure*.t (glob)
120 134 +++ $TESTTMP/test-failure*.t.err (glob)
121 @@ -1,2 +1,2 @@
135 @@ -1,4 +1,4 @@
122 136 $ echo babar
123 137 - rataxes
124 138 + babar
139 This is a noop statement so that
140 this test is still more bytes than success.
125 141
126 142 ERROR: test-failure*.t output changed (glob)
127 143 !
128 144 --- $TESTTMP/test-failure*.t (glob)
129 145 +++ $TESTTMP/test-failure*.t.err (glob)
130 @@ -1,2 +1,2 @@
146 @@ -1,4 +1,4 @@
131 147 $ echo babar
132 148 - rataxes
133 149 + babar
150 This is a noop statement so that
151 this test is still more bytes than success.
134 152
135 153 ERROR: test-failure*.t output changed (glob)
136 154 !
137 155 Failed test-failure*.t: output changed (glob)
138 156 Failed test-failure*.t: output changed (glob)
139 157 # Ran 2 tests, 0 skipped, 0 warned, 2 failed.
140 158 python hash seed: * (glob)
141 159 [1]
142 160
143 161 (delete the duplicated test file)
144 162 $ rm test-failure-copy.t
145 163
146 164
147 165 Interactive run
148 166 ===============
149 167
150 168 (backup the failing test)
151 169 $ cp test-failure.t backup
152 170
153 171 Refuse the fix
154 172
155 173 $ echo 'n' | $TESTDIR/run-tests.py --with-hg=`which hg` -i
156 174
157 175 --- $TESTTMP/test-failure.t
158 176 +++ $TESTTMP/test-failure.t.err
159 @@ -1,2 +1,2 @@
177 @@ -1,4 +1,4 @@
160 178 $ echo babar
161 179 - rataxes
162 180 + babar
181 This is a noop statement so that
182 this test is still more bytes than success.
163 183 Accept this change? [n]
164 184 ERROR: test-failure.t output changed
165 185 !.
166 186 Failed test-failure.t: output changed
167 187 # Ran 2 tests, 0 skipped, 0 warned, 1 failed.
168 188 python hash seed: * (glob)
169 189 [1]
170 190
171 191 $ cat test-failure.t
172 192 $ echo babar
173 193 rataxes
194 This is a noop statement so that
195 this test is still more bytes than success.
174 196
175 197 Accept the fix
176 198
177 199 $ echo 'y' | $TESTDIR/run-tests.py --with-hg=`which hg` -i
178 200
179 201 --- $TESTTMP/test-failure.t
180 202 +++ $TESTTMP/test-failure.t.err
181 @@ -1,2 +1,2 @@
203 @@ -1,4 +1,4 @@
182 204 $ echo babar
183 205 - rataxes
184 206 + babar
207 This is a noop statement so that
208 this test is still more bytes than success.
185 209 Accept this change? [n] ..
186 210 # Ran 2 tests, 0 skipped, 0 warned, 0 failed.
187 211
188 212 $ cat test-failure.t
189 213 $ echo babar
190 214 babar
215 This is a noop statement so that
216 this test is still more bytes than success.
191 217
192 218 (reinstall)
193 219 $ mv backup test-failure.t
194 220
195 221 No Diff
196 222 ===============
197 223
198 224 $ $TESTDIR/run-tests.py --with-hg=`which hg` --nodiff
199 225 !.
200 226 Failed test-failure.t: output changed
201 227 # Ran 2 tests, 0 skipped, 0 warned, 1 failed.
202 228 python hash seed: * (glob)
203 229 [1]
204 230
205 231 test for --time
206 232 ==================
207 233
208 234 $ $TESTDIR/run-tests.py --with-hg=`which hg` test-success.t --time
209 235 .
210 236 # Ran 1 tests, 0 skipped, 0 warned, 0 failed.
211 237 # Producing time report
212 238 cuser csys real Test
213 239 \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re)
214 240
215 241 test for --time with --job enabled
216 242 ====================================
217 243
218 244 $ $TESTDIR/run-tests.py --with-hg=`which hg` test-success.t --time --jobs 2
219 245 .
220 246 # Ran 1 tests, 0 skipped, 0 warned, 0 failed.
221 247 # Producing time report
222 248 cuser csys real Test
223 249 \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re)
General Comments 0
You need to be logged in to leave comments. Login now