Show More
@@ -1,460 +1,438 b'' | |||||
1 | This file tests the behavior of run-tests.py itself. |
|
1 | This file tests the behavior of run-tests.py itself. | |
2 |
|
2 | |||
3 | Smoke test |
|
3 | Smoke test | |
4 | ============ |
|
4 | ============ | |
5 |
|
5 | |||
6 | $ $TESTDIR/run-tests.py |
|
6 | $ $TESTDIR/run-tests.py | |
7 |
|
7 | |||
8 | # Ran 0 tests, 0 skipped, 0 warned, 0 failed. |
|
8 | # Ran 0 tests, 0 skipped, 0 warned, 0 failed. | |
9 |
|
9 | |||
10 | a succesful test |
|
10 | a succesful test | |
11 | ======================= |
|
11 | ======================= | |
12 |
|
12 | |||
13 | $ cat > test-success.t << EOF |
|
13 | $ cat > test-success.t << EOF | |
14 | > $ echo babar |
|
14 | > $ echo babar | |
15 | > babar |
|
15 | > babar | |
16 | > $ echo xyzzy |
|
16 | > $ echo xyzzy | |
17 | > xyzzy |
|
17 | > xyzzy | |
18 | > EOF |
|
18 | > EOF | |
19 |
|
19 | |||
20 | $ $TESTDIR/run-tests.py --with-hg=`which hg` |
|
20 | $ $TESTDIR/run-tests.py --with-hg=`which hg` | |
21 | . |
|
21 | . | |
22 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
|
22 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | |
23 |
|
23 | |||
24 | failing test |
|
24 | failing test | |
25 | ================== |
|
25 | ================== | |
26 |
|
26 | |||
27 | $ cat > test-failure.t << EOF |
|
27 | $ cat > test-failure.t << EOF | |
28 | > $ echo babar |
|
28 | > $ echo babar | |
29 | > rataxes |
|
29 | > rataxes | |
30 | > This is a noop statement so that |
|
30 | > This is a noop statement so that | |
31 | > this test is still more bytes than success. |
|
31 | > this test is still more bytes than success. | |
32 | > EOF |
|
32 | > EOF | |
33 |
|
33 | |||
34 | $ $TESTDIR/run-tests.py --with-hg=`which hg` |
|
34 | $ $TESTDIR/run-tests.py --with-hg=`which hg` | |
35 |
|
35 | |||
36 | --- $TESTTMP/test-failure.t (glob) |
|
36 | --- $TESTTMP/test-failure.t (glob) | |
37 | +++ $TESTTMP/test-failure.t.err (glob) |
|
37 | +++ $TESTTMP/test-failure.t.err (glob) | |
38 | @@ -1,4 +1,4 @@ |
|
38 | @@ -1,4 +1,4 @@ | |
39 | $ echo babar |
|
39 | $ echo babar | |
40 | - rataxes |
|
40 | - rataxes | |
41 | + babar |
|
41 | + babar | |
42 | This is a noop statement so that |
|
42 | This is a noop statement so that | |
43 | this test is still more bytes than success. |
|
43 | this test is still more bytes than success. | |
44 |
|
44 | |||
45 | ERROR: test-failure.t output changed |
|
45 | ERROR: test-failure.t output changed | |
46 | !. |
|
46 | !. | |
47 | Failed test-failure.t: output changed |
|
47 | Failed test-failure.t: output changed | |
48 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
|
48 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. | |
49 | python hash seed: * (glob) |
|
49 | python hash seed: * (glob) | |
50 | [1] |
|
50 | [1] | |
51 | test --xunit support |
|
51 | test --xunit support | |
52 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --xunit=xunit.xml |
|
52 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --xunit=xunit.xml | |
53 |
|
53 | |||
54 | --- $TESTTMP/test-failure.t |
|
54 | --- $TESTTMP/test-failure.t | |
55 | +++ $TESTTMP/test-failure.t.err |
|
55 | +++ $TESTTMP/test-failure.t.err | |
56 | @@ -1,4 +1,4 @@ |
|
56 | @@ -1,4 +1,4 @@ | |
57 | $ echo babar |
|
57 | $ echo babar | |
58 | - rataxes |
|
58 | - rataxes | |
59 | + babar |
|
59 | + babar | |
60 | This is a noop statement so that |
|
60 | This is a noop statement so that | |
61 | this test is still more bytes than success. |
|
61 | this test is still more bytes than success. | |
62 |
|
62 | |||
63 | ERROR: test-failure.t output changed |
|
63 | ERROR: test-failure.t output changed | |
64 | !. |
|
64 | !. | |
65 | Failed test-failure.t: output changed |
|
65 | Failed test-failure.t: output changed | |
66 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
|
66 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. | |
67 | python hash seed: * (glob) |
|
67 | python hash seed: * (glob) | |
68 | [1] |
|
68 | [1] | |
69 | $ cat xunit.xml |
|
69 | $ cat xunit.xml | |
70 | <?xml version="1.0" encoding="utf-8"?> |
|
70 | <?xml version="1.0" encoding="utf-8"?> | |
71 | <testsuite errors="0" failures="1" name="run-tests" skipped="0" tests="2"> |
|
71 | <testsuite errors="0" failures="1" name="run-tests" skipped="0" tests="2"> | |
72 | <testcase name="test-success.t" time="*"/> (glob) |
|
72 | <testcase name="test-success.t" time="*"/> (glob) | |
73 | <testcase name="test-failure.t" time="*"> (glob) |
|
73 | <testcase name="test-failure.t" time="*"> (glob) | |
74 | <![CDATA[--- $TESTTMP/test-failure.t |
|
74 | <![CDATA[--- $TESTTMP/test-failure.t | |
75 | +++ $TESTTMP/test-failure.t.err |
|
75 | +++ $TESTTMP/test-failure.t.err | |
76 | @@ -1,4 +1,4 @@ |
|
76 | @@ -1,4 +1,4 @@ | |
77 | $ echo babar |
|
77 | $ echo babar | |
78 | - rataxes |
|
78 | - rataxes | |
79 | + babar |
|
79 | + babar | |
80 | This is a noop statement so that |
|
80 | This is a noop statement so that | |
81 | this test is still more bytes than success. |
|
81 | this test is still more bytes than success. | |
82 | ]]> </testcase> |
|
82 | ]]> </testcase> | |
83 | </testsuite> |
|
83 | </testsuite> | |
84 |
|
84 | |||
85 | test for --retest |
|
85 | test for --retest | |
86 | ==================== |
|
86 | ==================== | |
87 |
|
87 | |||
88 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --retest |
|
88 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --retest | |
89 |
|
89 | |||
90 | --- $TESTTMP/test-failure.t (glob) |
|
90 | --- $TESTTMP/test-failure.t (glob) | |
91 | +++ $TESTTMP/test-failure.t.err (glob) |
|
91 | +++ $TESTTMP/test-failure.t.err (glob) | |
92 | @@ -1,4 +1,4 @@ |
|
92 | @@ -1,4 +1,4 @@ | |
93 | $ echo babar |
|
93 | $ echo babar | |
94 | - rataxes |
|
94 | - rataxes | |
95 | + babar |
|
95 | + babar | |
96 | This is a noop statement so that |
|
96 | This is a noop statement so that | |
97 | this test is still more bytes than success. |
|
97 | this test is still more bytes than success. | |
98 |
|
98 | |||
99 | ERROR: test-failure.t output changed |
|
99 | ERROR: test-failure.t output changed | |
100 | ! |
|
100 | ! | |
101 | Failed test-failure.t: output changed |
|
101 | Failed test-failure.t: output changed | |
102 | # Ran 2 tests, 1 skipped, 0 warned, 1 failed. |
|
102 | # Ran 2 tests, 1 skipped, 0 warned, 1 failed. | |
103 | python hash seed: * (glob) |
|
103 | python hash seed: * (glob) | |
104 | [1] |
|
104 | [1] | |
105 |
|
105 | |||
106 | Selecting Tests To Run |
|
106 | Selecting Tests To Run | |
107 | ====================== |
|
107 | ====================== | |
108 |
|
108 | |||
109 | successful |
|
109 | successful | |
110 |
|
110 | |||
111 | $ $TESTDIR/run-tests.py --with-hg=`which hg` test-success.t |
|
111 | $ $TESTDIR/run-tests.py --with-hg=`which hg` test-success.t | |
112 | . |
|
112 | . | |
113 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
|
113 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | |
114 |
|
114 | |||
115 | success w/ keyword |
|
115 | success w/ keyword | |
116 | $ $TESTDIR/run-tests.py --with-hg=`which hg` -k xyzzy |
|
116 | $ $TESTDIR/run-tests.py --with-hg=`which hg` -k xyzzy | |
117 | . |
|
117 | . | |
118 | # Ran 2 tests, 1 skipped, 0 warned, 0 failed. |
|
118 | # Ran 2 tests, 1 skipped, 0 warned, 0 failed. | |
119 |
|
119 | |||
120 | failed |
|
120 | failed | |
121 |
|
121 | |||
122 | $ $TESTDIR/run-tests.py --with-hg=`which hg` test-failure.t |
|
122 | $ $TESTDIR/run-tests.py --with-hg=`which hg` test-failure.t | |
123 |
|
123 | |||
124 | --- $TESTTMP/test-failure.t (glob) |
|
124 | --- $TESTTMP/test-failure.t (glob) | |
125 | +++ $TESTTMP/test-failure.t.err (glob) |
|
125 | +++ $TESTTMP/test-failure.t.err (glob) | |
126 | @@ -1,4 +1,4 @@ |
|
126 | @@ -1,4 +1,4 @@ | |
127 | $ echo babar |
|
127 | $ echo babar | |
128 | - rataxes |
|
128 | - rataxes | |
129 | + babar |
|
129 | + babar | |
130 | This is a noop statement so that |
|
130 | This is a noop statement so that | |
131 | this test is still more bytes than success. |
|
131 | this test is still more bytes than success. | |
132 |
|
132 | |||
133 | ERROR: test-failure.t output changed |
|
133 | ERROR: test-failure.t output changed | |
134 | ! |
|
134 | ! | |
135 | Failed test-failure.t: output changed |
|
135 | Failed test-failure.t: output changed | |
136 | # Ran 1 tests, 0 skipped, 0 warned, 1 failed. |
|
136 | # Ran 1 tests, 0 skipped, 0 warned, 1 failed. | |
137 | python hash seed: * (glob) |
|
137 | python hash seed: * (glob) | |
138 | [1] |
|
138 | [1] | |
139 |
|
139 | |||
140 | failure w/ keyword |
|
140 | failure w/ keyword | |
141 | $ $TESTDIR/run-tests.py --with-hg=`which hg` -k rataxes |
|
141 | $ $TESTDIR/run-tests.py --with-hg=`which hg` -k rataxes | |
142 |
|
142 | |||
143 | --- $TESTTMP/test-failure.t |
|
143 | --- $TESTTMP/test-failure.t | |
144 | +++ $TESTTMP/test-failure.t.err |
|
144 | +++ $TESTTMP/test-failure.t.err | |
145 | @@ -1,4 +1,4 @@ |
|
145 | @@ -1,4 +1,4 @@ | |
146 | $ echo babar |
|
146 | $ echo babar | |
147 | - rataxes |
|
147 | - rataxes | |
148 | + babar |
|
148 | + babar | |
149 | This is a noop statement so that |
|
149 | This is a noop statement so that | |
150 | this test is still more bytes than success. |
|
150 | this test is still more bytes than success. | |
151 |
|
151 | |||
152 | ERROR: test-failure.t output changed |
|
152 | ERROR: test-failure.t output changed | |
153 | ! |
|
153 | ! | |
154 | Failed test-failure.t: output changed |
|
154 | Failed test-failure.t: output changed | |
155 | # Ran 2 tests, 1 skipped, 0 warned, 1 failed. |
|
155 | # Ran 2 tests, 1 skipped, 0 warned, 1 failed. | |
156 | python hash seed: * (glob) |
|
156 | python hash seed: * (glob) | |
157 | [1] |
|
157 | [1] | |
158 |
|
158 | |||
159 | Verify that when a process fails to start we show a useful message |
|
159 | Verify that when a process fails to start we show a useful message | |
160 | ================================================================== |
|
160 | ================================================================== | |
161 | NOTE: there is currently a bug where this shows "2 failed" even though |
|
161 | NOTE: there is currently a bug where this shows "2 failed" even though | |
162 | it's actually the same test being reported for failure twice. |
|
162 | it's actually the same test being reported for failure twice. | |
163 |
|
163 | |||
164 | $ cat > test-serve-fail.t <<EOF |
|
164 | $ cat > test-serve-fail.t <<EOF | |
165 | > $ echo 'abort: child process failed to start blah' |
|
165 | > $ echo 'abort: child process failed to start blah' | |
166 | > EOF |
|
166 | > EOF | |
167 | $ $TESTDIR/run-tests.py --with-hg=`which hg` test-serve-fail.t |
|
167 | $ $TESTDIR/run-tests.py --with-hg=`which hg` test-serve-fail.t | |
168 |
|
168 | |||
169 | ERROR: test-serve-fail.t output changed |
|
169 | ERROR: test-serve-fail.t output changed | |
170 | ! |
|
170 | ! | |
171 | ERROR: test-serve-fail.t output changed |
|
171 | ERROR: test-serve-fail.t output changed | |
172 | ! |
|
172 | ! | |
173 | Failed test-serve-fail.t: server failed to start (HGPORT=*) (glob) |
|
173 | Failed test-serve-fail.t: server failed to start (HGPORT=*) (glob) | |
174 | Failed test-serve-fail.t: output changed |
|
174 | Failed test-serve-fail.t: output changed | |
175 | # Ran 1 tests, 0 skipped, 0 warned, 2 failed. |
|
175 | # Ran 1 tests, 0 skipped, 0 warned, 2 failed. | |
176 | python hash seed: * (glob) |
|
176 | python hash seed: * (glob) | |
177 | [1] |
|
177 | [1] | |
178 | $ rm test-serve-fail.t |
|
178 | $ rm test-serve-fail.t | |
179 |
|
179 | |||
180 | Running In Debug Mode |
|
180 | Running In Debug Mode | |
181 | ====================== |
|
181 | ====================== | |
182 |
|
182 | |||
183 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --debug 2>&1 | grep -v pwd |
|
183 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --debug 2>&1 | grep -v pwd | |
184 | + echo SALT* 0 0 (glob) |
|
184 | + echo SALT* 0 0 (glob) | |
185 | SALT* 0 0 (glob) |
|
185 | SALT* 0 0 (glob) | |
186 | + echo babar |
|
186 | + echo babar | |
187 | babar |
|
187 | babar | |
188 | + echo SALT* 4 0 (glob) |
|
188 | + echo SALT* 4 0 (glob) | |
189 | SALT* 4 0 (glob) |
|
189 | SALT* 4 0 (glob) | |
190 | .+ echo SALT* 0 0 (glob) |
|
190 | .+ echo SALT* 0 0 (glob) | |
191 | SALT* 0 0 (glob) |
|
191 | SALT* 0 0 (glob) | |
192 | + echo babar |
|
192 | + echo babar | |
193 | babar |
|
193 | babar | |
194 | + echo SALT* 2 0 (glob) |
|
194 | + echo SALT* 2 0 (glob) | |
195 | SALT* 2 0 (glob) |
|
195 | SALT* 2 0 (glob) | |
196 | + echo xyzzy |
|
196 | + echo xyzzy | |
197 | xyzzy |
|
197 | xyzzy | |
198 | + echo SALT* 4 0 (glob) |
|
198 | + echo SALT* 4 0 (glob) | |
199 | SALT* 4 0 (glob) |
|
199 | SALT* 4 0 (glob) | |
200 | . |
|
200 | . | |
201 | # Ran 2 tests, 0 skipped, 0 warned, 0 failed. |
|
201 | # Ran 2 tests, 0 skipped, 0 warned, 0 failed. | |
202 |
|
202 | |||
203 | Parallel runs |
|
203 | Parallel runs | |
204 | ============== |
|
204 | ============== | |
205 |
|
205 | |||
206 | (duplicate the failing test to get predictable output) |
|
206 | (duplicate the failing test to get predictable output) | |
207 | $ cp test-failure.t test-failure-copy.t |
|
207 | $ cp test-failure.t test-failure-copy.t | |
208 |
|
208 | |||
209 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --jobs 2 test-failure*.t |
|
209 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --jobs 2 test-failure*.t -n | |
210 |
|
210 | !! | ||
211 | --- $TESTTMP/test-failure*.t (glob) |
|
|||
212 | +++ $TESTTMP/test-failure*.t.err (glob) |
|
|||
213 | @@ -1,4 +1,4 @@ |
|
|||
214 | $ echo babar |
|
|||
215 | - rataxes |
|
|||
216 | + babar |
|
|||
217 | This is a noop statement so that |
|
|||
218 | this test is still more bytes than success. |
|
|||
219 |
|
||||
220 | ERROR: test-failure*.t output changed (glob) |
|
|||
221 | ! |
|
|||
222 | --- $TESTTMP/test-failure*.t (glob) |
|
|||
223 | +++ $TESTTMP/test-failure*.t.err (glob) |
|
|||
224 | @@ -1,4 +1,4 @@ |
|
|||
225 | $ echo babar |
|
|||
226 | - rataxes |
|
|||
227 | + babar |
|
|||
228 | This is a noop statement so that |
|
|||
229 | this test is still more bytes than success. |
|
|||
230 |
|
||||
231 | ERROR: test-failure*.t output changed (glob) |
|
|||
232 | ! |
|
|||
233 | Failed test-failure*.t: output changed (glob) |
|
211 | Failed test-failure*.t: output changed (glob) | |
234 | Failed test-failure*.t: output changed (glob) |
|
212 | Failed test-failure*.t: output changed (glob) | |
235 | # Ran 2 tests, 0 skipped, 0 warned, 2 failed. |
|
213 | # Ran 2 tests, 0 skipped, 0 warned, 2 failed. | |
236 | python hash seed: * (glob) |
|
214 | python hash seed: * (glob) | |
237 | [1] |
|
215 | [1] | |
238 |
|
216 | |||
239 | failures in parallel with --first should only print one failure |
|
217 | failures in parallel with --first should only print one failure | |
240 | >>> f = open('test-nothing.t', 'w') |
|
218 | >>> f = open('test-nothing.t', 'w') | |
241 | >>> f.write('foo\n' * 1024) |
|
219 | >>> f.write('foo\n' * 1024) | |
242 | >>> f.write(' $ sleep 1') |
|
220 | >>> f.write(' $ sleep 1') | |
243 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --jobs 2 --first |
|
221 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --jobs 2 --first | |
244 |
|
222 | |||
245 | --- $TESTTMP/test-failure*.t (glob) |
|
223 | --- $TESTTMP/test-failure*.t (glob) | |
246 | +++ $TESTTMP/test-failure*.t.err (glob) |
|
224 | +++ $TESTTMP/test-failure*.t.err (glob) | |
247 | @@ -1,4 +1,4 @@ |
|
225 | @@ -1,4 +1,4 @@ | |
248 | $ echo babar |
|
226 | $ echo babar | |
249 | - rataxes |
|
227 | - rataxes | |
250 | + babar |
|
228 | + babar | |
251 | This is a noop statement so that |
|
229 | This is a noop statement so that | |
252 | this test is still more bytes than success. |
|
230 | this test is still more bytes than success. | |
253 |
|
231 | |||
254 | Failed test-failure*.t: output changed (glob) |
|
232 | Failed test-failure*.t: output changed (glob) | |
255 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
|
233 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. | |
256 | python hash seed: * (glob) |
|
234 | python hash seed: * (glob) | |
257 | [1] |
|
235 | [1] | |
258 |
|
236 | |||
259 |
|
237 | |||
260 | (delete the duplicated test file) |
|
238 | (delete the duplicated test file) | |
261 | $ rm test-failure-copy.t test-nothing.t |
|
239 | $ rm test-failure-copy.t test-nothing.t | |
262 |
|
240 | |||
263 |
|
241 | |||
264 | Interactive run |
|
242 | Interactive run | |
265 | =============== |
|
243 | =============== | |
266 |
|
244 | |||
267 | (backup the failing test) |
|
245 | (backup the failing test) | |
268 | $ cp test-failure.t backup |
|
246 | $ cp test-failure.t backup | |
269 |
|
247 | |||
270 | Refuse the fix |
|
248 | Refuse the fix | |
271 |
|
249 | |||
272 | $ echo 'n' | $TESTDIR/run-tests.py --with-hg=`which hg` -i |
|
250 | $ echo 'n' | $TESTDIR/run-tests.py --with-hg=`which hg` -i | |
273 |
|
251 | |||
274 | --- $TESTTMP/test-failure.t |
|
252 | --- $TESTTMP/test-failure.t | |
275 | +++ $TESTTMP/test-failure.t.err |
|
253 | +++ $TESTTMP/test-failure.t.err | |
276 | @@ -1,4 +1,4 @@ |
|
254 | @@ -1,4 +1,4 @@ | |
277 | $ echo babar |
|
255 | $ echo babar | |
278 | - rataxes |
|
256 | - rataxes | |
279 | + babar |
|
257 | + babar | |
280 | This is a noop statement so that |
|
258 | This is a noop statement so that | |
281 | this test is still more bytes than success. |
|
259 | this test is still more bytes than success. | |
282 | Accept this change? [n] |
|
260 | Accept this change? [n] | |
283 | ERROR: test-failure.t output changed |
|
261 | ERROR: test-failure.t output changed | |
284 | !. |
|
262 | !. | |
285 | Failed test-failure.t: output changed |
|
263 | Failed test-failure.t: output changed | |
286 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
|
264 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. | |
287 | python hash seed: * (glob) |
|
265 | python hash seed: * (glob) | |
288 | [1] |
|
266 | [1] | |
289 |
|
267 | |||
290 | $ cat test-failure.t |
|
268 | $ cat test-failure.t | |
291 | $ echo babar |
|
269 | $ echo babar | |
292 | rataxes |
|
270 | rataxes | |
293 | This is a noop statement so that |
|
271 | This is a noop statement so that | |
294 | this test is still more bytes than success. |
|
272 | this test is still more bytes than success. | |
295 |
|
273 | |||
296 | Interactive with custom view |
|
274 | Interactive with custom view | |
297 |
|
275 | |||
298 | $ echo 'n' | $TESTDIR/run-tests.py --with-hg=`which hg` -i --view echo |
|
276 | $ echo 'n' | $TESTDIR/run-tests.py --with-hg=`which hg` -i --view echo | |
299 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err |
|
277 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err | |
300 | Accept this change? [n]* (glob) |
|
278 | Accept this change? [n]* (glob) | |
301 | ERROR: test-failure.t output changed |
|
279 | ERROR: test-failure.t output changed | |
302 | !. |
|
280 | !. | |
303 | Failed test-failure.t: output changed |
|
281 | Failed test-failure.t: output changed | |
304 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
|
282 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. | |
305 | python hash seed: * (glob) |
|
283 | python hash seed: * (glob) | |
306 | [1] |
|
284 | [1] | |
307 |
|
285 | |||
308 | View the fix |
|
286 | View the fix | |
309 |
|
287 | |||
310 | $ echo 'y' | $TESTDIR/run-tests.py --with-hg=`which hg` --view echo |
|
288 | $ echo 'y' | $TESTDIR/run-tests.py --with-hg=`which hg` --view echo | |
311 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err |
|
289 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err | |
312 |
|
290 | |||
313 | ERROR: test-failure.t output changed |
|
291 | ERROR: test-failure.t output changed | |
314 | !. |
|
292 | !. | |
315 | Failed test-failure.t: output changed |
|
293 | Failed test-failure.t: output changed | |
316 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
|
294 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. | |
317 | python hash seed: * (glob) |
|
295 | python hash seed: * (glob) | |
318 | [1] |
|
296 | [1] | |
319 |
|
297 | |||
320 | Accept the fix |
|
298 | Accept the fix | |
321 |
|
299 | |||
322 | $ echo 'y' | $TESTDIR/run-tests.py --with-hg=`which hg` -i |
|
300 | $ echo 'y' | $TESTDIR/run-tests.py --with-hg=`which hg` -i | |
323 |
|
301 | |||
324 | --- $TESTTMP/test-failure.t |
|
302 | --- $TESTTMP/test-failure.t | |
325 | +++ $TESTTMP/test-failure.t.err |
|
303 | +++ $TESTTMP/test-failure.t.err | |
326 | @@ -1,4 +1,4 @@ |
|
304 | @@ -1,4 +1,4 @@ | |
327 | $ echo babar |
|
305 | $ echo babar | |
328 | - rataxes |
|
306 | - rataxes | |
329 | + babar |
|
307 | + babar | |
330 | This is a noop statement so that |
|
308 | This is a noop statement so that | |
331 | this test is still more bytes than success. |
|
309 | this test is still more bytes than success. | |
332 | Accept this change? [n] .. |
|
310 | Accept this change? [n] .. | |
333 | # Ran 2 tests, 0 skipped, 0 warned, 0 failed. |
|
311 | # Ran 2 tests, 0 skipped, 0 warned, 0 failed. | |
334 |
|
312 | |||
335 | $ cat test-failure.t |
|
313 | $ cat test-failure.t | |
336 | $ echo babar |
|
314 | $ echo babar | |
337 | babar |
|
315 | babar | |
338 | This is a noop statement so that |
|
316 | This is a noop statement so that | |
339 | this test is still more bytes than success. |
|
317 | this test is still more bytes than success. | |
340 |
|
318 | |||
341 | (reinstall) |
|
319 | (reinstall) | |
342 | $ mv backup test-failure.t |
|
320 | $ mv backup test-failure.t | |
343 |
|
321 | |||
344 | No Diff |
|
322 | No Diff | |
345 | =============== |
|
323 | =============== | |
346 |
|
324 | |||
347 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --nodiff |
|
325 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --nodiff | |
348 | !. |
|
326 | !. | |
349 | Failed test-failure.t: output changed |
|
327 | Failed test-failure.t: output changed | |
350 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
|
328 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. | |
351 | python hash seed: * (glob) |
|
329 | python hash seed: * (glob) | |
352 | [1] |
|
330 | [1] | |
353 |
|
331 | |||
354 | test for --time |
|
332 | test for --time | |
355 | ================== |
|
333 | ================== | |
356 |
|
334 | |||
357 | $ $TESTDIR/run-tests.py --with-hg=`which hg` test-success.t --time |
|
335 | $ $TESTDIR/run-tests.py --with-hg=`which hg` test-success.t --time | |
358 | . |
|
336 | . | |
359 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
|
337 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | |
360 | # Producing time report |
|
338 | # Producing time report | |
361 | cuser csys real Test |
|
339 | cuser csys real Test | |
362 | \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) |
|
340 | \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) | |
363 |
|
341 | |||
364 | test for --time with --job enabled |
|
342 | test for --time with --job enabled | |
365 | ==================================== |
|
343 | ==================================== | |
366 |
|
344 | |||
367 | $ $TESTDIR/run-tests.py --with-hg=`which hg` test-success.t --time --jobs 2 |
|
345 | $ $TESTDIR/run-tests.py --with-hg=`which hg` test-success.t --time --jobs 2 | |
368 | . |
|
346 | . | |
369 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
|
347 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | |
370 | # Producing time report |
|
348 | # Producing time report | |
371 | cuser csys real Test |
|
349 | cuser csys real Test | |
372 | \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) |
|
350 | \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) | |
373 |
|
351 | |||
374 | Skips |
|
352 | Skips | |
375 | ================ |
|
353 | ================ | |
376 | $ cat > test-skip.t <<EOF |
|
354 | $ cat > test-skip.t <<EOF | |
377 | > $ echo xyzzy |
|
355 | > $ echo xyzzy | |
378 | > #require false |
|
356 | > #require false | |
379 | > EOF |
|
357 | > EOF | |
380 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --nodiff |
|
358 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --nodiff | |
381 | !.s |
|
359 | !.s | |
382 | Skipped test-skip.t: skipped |
|
360 | Skipped test-skip.t: skipped | |
383 | Failed test-failure.t: output changed |
|
361 | Failed test-failure.t: output changed | |
384 | # Ran 2 tests, 1 skipped, 0 warned, 1 failed. |
|
362 | # Ran 2 tests, 1 skipped, 0 warned, 1 failed. | |
385 | python hash seed: * (glob) |
|
363 | python hash seed: * (glob) | |
386 | [1] |
|
364 | [1] | |
387 |
|
365 | |||
388 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --keyword xyzzy |
|
366 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --keyword xyzzy | |
389 | .s |
|
367 | .s | |
390 | Skipped test-skip.t: skipped |
|
368 | Skipped test-skip.t: skipped | |
391 | # Ran 2 tests, 2 skipped, 0 warned, 0 failed. |
|
369 | # Ran 2 tests, 2 skipped, 0 warned, 0 failed. | |
392 |
|
370 | |||
393 | Skips with xml |
|
371 | Skips with xml | |
394 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --keyword xyzzy \ |
|
372 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --keyword xyzzy \ | |
395 | > --xunit=xunit.xml |
|
373 | > --xunit=xunit.xml | |
396 | .s |
|
374 | .s | |
397 | Skipped test-skip.t: skipped |
|
375 | Skipped test-skip.t: skipped | |
398 | # Ran 2 tests, 2 skipped, 0 warned, 0 failed. |
|
376 | # Ran 2 tests, 2 skipped, 0 warned, 0 failed. | |
399 | $ cat xunit.xml |
|
377 | $ cat xunit.xml | |
400 | <?xml version="1.0" encoding="utf-8"?> |
|
378 | <?xml version="1.0" encoding="utf-8"?> | |
401 | <testsuite errors="0" failures="0" name="run-tests" skipped="2" tests="2"> |
|
379 | <testsuite errors="0" failures="0" name="run-tests" skipped="2" tests="2"> | |
402 | <testcase name="test-success.t" time="*"/> (glob) |
|
380 | <testcase name="test-success.t" time="*"/> (glob) | |
403 | </testsuite> |
|
381 | </testsuite> | |
404 |
|
382 | |||
405 | Missing skips or blacklisted skips don't count as executed: |
|
383 | Missing skips or blacklisted skips don't count as executed: | |
406 | $ echo test-failure.t > blacklist |
|
384 | $ echo test-failure.t > blacklist | |
407 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --blacklist=blacklist \ |
|
385 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --blacklist=blacklist \ | |
408 | > test-failure.t test-bogus.t |
|
386 | > test-failure.t test-bogus.t | |
409 | ss |
|
387 | ss | |
410 | Skipped test-bogus.t: Doesn't exist |
|
388 | Skipped test-bogus.t: Doesn't exist | |
411 | Skipped test-failure.t: blacklisted |
|
389 | Skipped test-failure.t: blacklisted | |
412 | # Ran 0 tests, 2 skipped, 0 warned, 0 failed. |
|
390 | # Ran 0 tests, 2 skipped, 0 warned, 0 failed. | |
413 |
|
391 | |||
414 | #if json |
|
392 | #if json | |
415 |
|
393 | |||
416 | test for --json |
|
394 | test for --json | |
417 | ================== |
|
395 | ================== | |
418 |
|
396 | |||
419 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --json |
|
397 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --json | |
420 |
|
398 | |||
421 | --- $TESTTMP/test-failure.t |
|
399 | --- $TESTTMP/test-failure.t | |
422 | +++ $TESTTMP/test-failure.t.err |
|
400 | +++ $TESTTMP/test-failure.t.err | |
423 | @@ -1,4 +1,4 @@ |
|
401 | @@ -1,4 +1,4 @@ | |
424 | $ echo babar |
|
402 | $ echo babar | |
425 | - rataxes |
|
403 | - rataxes | |
426 | + babar |
|
404 | + babar | |
427 | This is a noop statement so that |
|
405 | This is a noop statement so that | |
428 | this test is still more bytes than success. |
|
406 | this test is still more bytes than success. | |
429 |
|
407 | |||
430 | ERROR: test-failure.t output changed |
|
408 | ERROR: test-failure.t output changed | |
431 | !.s |
|
409 | !.s | |
432 | Skipped test-skip.t: skipped |
|
410 | Skipped test-skip.t: skipped | |
433 | Failed test-failure.t: output changed |
|
411 | Failed test-failure.t: output changed | |
434 | # Ran 2 tests, 1 skipped, 0 warned, 1 failed. |
|
412 | # Ran 2 tests, 1 skipped, 0 warned, 1 failed. | |
435 | python hash seed: * (glob) |
|
413 | python hash seed: * (glob) | |
436 | [1] |
|
414 | [1] | |
437 |
|
415 | |||
438 | $ cat report.json |
|
416 | $ cat report.json | |
439 | testreport ={ |
|
417 | testreport ={ | |
440 | "test-failure.t": [\{] (re) |
|
418 | "test-failure.t": [\{] (re) | |
441 | "csys": "\s*[\d\.]{5}", (re) |
|
419 | "csys": "\s*[\d\.]{5}", (re) | |
442 | "cuser": "\s*[\d\.]{5}", (re) |
|
420 | "cuser": "\s*[\d\.]{5}", (re) | |
443 | "result": "failure", |
|
421 | "result": "failure", | |
444 | "time": "\s*[\d\.]{5}" (re) |
|
422 | "time": "\s*[\d\.]{5}" (re) | |
445 | }, |
|
423 | }, | |
446 | "test-skip.t": { |
|
424 | "test-skip.t": { | |
447 | "csys": "\s*[\d\.]{5}", (re) |
|
425 | "csys": "\s*[\d\.]{5}", (re) | |
448 | "cuser": "\s*[\d\.]{5}", (re) |
|
426 | "cuser": "\s*[\d\.]{5}", (re) | |
449 | "result": "skip", |
|
427 | "result": "skip", | |
450 | "time": "\s*[\d\.]{5}" (re) |
|
428 | "time": "\s*[\d\.]{5}" (re) | |
451 | }, |
|
429 | }, | |
452 | "test-success.t": [\{] (re) |
|
430 | "test-success.t": [\{] (re) | |
453 | "csys": "\s*[\d\.]{5}", (re) |
|
431 | "csys": "\s*[\d\.]{5}", (re) | |
454 | "cuser": "\s*[\d\.]{5}", (re) |
|
432 | "cuser": "\s*[\d\.]{5}", (re) | |
455 | "result": "success", |
|
433 | "result": "success", | |
456 | "time": "\s*[\d\.]{5}" (re) |
|
434 | "time": "\s*[\d\.]{5}" (re) | |
457 | } |
|
435 | } | |
458 | } (no-eol) |
|
436 | } (no-eol) | |
459 |
|
437 | |||
460 | #endif |
|
438 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now