Show More
@@ -1,438 +1,438 | |||||
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 |
|
36 | --- $TESTTMP/test-failure.t | |
37 | +++ $TESTTMP/test-failure.t.err |
|
37 | +++ $TESTTMP/test-failure.t.err | |
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 |
|
90 | --- $TESTTMP/test-failure.t | |
91 | +++ $TESTTMP/test-failure.t.err |
|
91 | +++ $TESTTMP/test-failure.t.err | |
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 |
|
124 | --- $TESTTMP/test-failure.t | |
125 | +++ $TESTTMP/test-failure.t.err |
|
125 | +++ $TESTTMP/test-failure.t.err | |
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 -n |
|
209 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --jobs 2 test-failure*.t -n | |
210 | !! |
|
210 | !! | |
211 | Failed test-failure*.t: output changed (glob) |
|
211 | Failed test-failure*.t: output changed (glob) | |
212 | Failed test-failure*.t: output changed (glob) |
|
212 | Failed test-failure*.t: output changed (glob) | |
213 | # Ran 2 tests, 0 skipped, 0 warned, 2 failed. |
|
213 | # Ran 2 tests, 0 skipped, 0 warned, 2 failed. | |
214 | python hash seed: * (glob) |
|
214 | python hash seed: * (glob) | |
215 | [1] |
|
215 | [1] | |
216 |
|
216 | |||
217 | failures in parallel with --first should only print one failure |
|
217 | failures in parallel with --first should only print one failure | |
218 | >>> f = open('test-nothing.t', 'w') |
|
218 | >>> f = open('test-nothing.t', 'w') | |
219 | >>> f.write('foo\n' * 1024) |
|
219 | >>> f.write('foo\n' * 1024) | |
220 | >>> f.write(' $ sleep 1') |
|
220 | >>> f.write(' $ sleep 1') | |
221 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --jobs 2 --first |
|
221 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --jobs 2 --first | |
222 |
|
222 | |||
223 | --- $TESTTMP/test-failure*.t (glob) |
|
223 | --- $TESTTMP/test-failure*.t (glob) | |
224 | +++ $TESTTMP/test-failure*.t.err (glob) |
|
224 | +++ $TESTTMP/test-failure*.t.err (glob) | |
225 | @@ -1,4 +1,4 @@ |
|
225 | @@ -1,4 +1,4 @@ | |
226 | $ echo babar |
|
226 | $ echo babar | |
227 | - rataxes |
|
227 | - rataxes | |
228 | + babar |
|
228 | + babar | |
229 | This is a noop statement so that |
|
229 | This is a noop statement so that | |
230 | this test is still more bytes than success. |
|
230 | this test is still more bytes than success. | |
231 |
|
231 | |||
232 | Failed test-failure*.t: output changed (glob) |
|
232 | Failed test-failure*.t: output changed (glob) | |
233 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
|
233 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. | |
234 | python hash seed: * (glob) |
|
234 | python hash seed: * (glob) | |
235 | [1] |
|
235 | [1] | |
236 |
|
236 | |||
237 |
|
237 | |||
238 | (delete the duplicated test file) |
|
238 | (delete the duplicated test file) | |
239 | $ rm test-failure-copy.t test-nothing.t |
|
239 | $ rm test-failure-copy.t test-nothing.t | |
240 |
|
240 | |||
241 |
|
241 | |||
242 | Interactive run |
|
242 | Interactive run | |
243 | =============== |
|
243 | =============== | |
244 |
|
244 | |||
245 | (backup the failing test) |
|
245 | (backup the failing test) | |
246 | $ cp test-failure.t backup |
|
246 | $ cp test-failure.t backup | |
247 |
|
247 | |||
248 | Refuse the fix |
|
248 | Refuse the fix | |
249 |
|
249 | |||
250 | $ echo 'n' | $TESTDIR/run-tests.py --with-hg=`which hg` -i |
|
250 | $ echo 'n' | $TESTDIR/run-tests.py --with-hg=`which hg` -i | |
251 |
|
251 | |||
252 | --- $TESTTMP/test-failure.t |
|
252 | --- $TESTTMP/test-failure.t | |
253 | +++ $TESTTMP/test-failure.t.err |
|
253 | +++ $TESTTMP/test-failure.t.err | |
254 | @@ -1,4 +1,4 @@ |
|
254 | @@ -1,4 +1,4 @@ | |
255 | $ echo babar |
|
255 | $ echo babar | |
256 | - rataxes |
|
256 | - rataxes | |
257 | + babar |
|
257 | + babar | |
258 | This is a noop statement so that |
|
258 | This is a noop statement so that | |
259 | this test is still more bytes than success. |
|
259 | this test is still more bytes than success. | |
260 | Accept this change? [n] |
|
260 | Accept this change? [n] | |
261 | ERROR: test-failure.t output changed |
|
261 | ERROR: test-failure.t output changed | |
262 | !. |
|
262 | !. | |
263 | Failed test-failure.t: output changed |
|
263 | Failed test-failure.t: output changed | |
264 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
|
264 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. | |
265 | python hash seed: * (glob) |
|
265 | python hash seed: * (glob) | |
266 | [1] |
|
266 | [1] | |
267 |
|
267 | |||
268 | $ cat test-failure.t |
|
268 | $ cat test-failure.t | |
269 | $ echo babar |
|
269 | $ echo babar | |
270 | rataxes |
|
270 | rataxes | |
271 | This is a noop statement so that |
|
271 | This is a noop statement so that | |
272 | this test is still more bytes than success. |
|
272 | this test is still more bytes than success. | |
273 |
|
273 | |||
274 | Interactive with custom view |
|
274 | Interactive with custom view | |
275 |
|
275 | |||
276 | $ 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 | |
277 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) |
|
277 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) | |
278 | Accept this change? [n]* (glob) |
|
278 | Accept this change? [n]* (glob) | |
279 | ERROR: test-failure.t output changed |
|
279 | ERROR: test-failure.t output changed | |
280 | !. |
|
280 | !. | |
281 | Failed test-failure.t: output changed |
|
281 | Failed test-failure.t: output changed | |
282 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
|
282 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. | |
283 | python hash seed: * (glob) |
|
283 | python hash seed: * (glob) | |
284 | [1] |
|
284 | [1] | |
285 |
|
285 | |||
286 | View the fix |
|
286 | View the fix | |
287 |
|
287 | |||
288 | $ 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 | |
289 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) |
|
289 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) | |
290 |
|
290 | |||
291 | ERROR: test-failure.t output changed |
|
291 | ERROR: test-failure.t output changed | |
292 | !. |
|
292 | !. | |
293 | Failed test-failure.t: output changed |
|
293 | Failed test-failure.t: output changed | |
294 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
|
294 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. | |
295 | python hash seed: * (glob) |
|
295 | python hash seed: * (glob) | |
296 | [1] |
|
296 | [1] | |
297 |
|
297 | |||
298 | Accept the fix |
|
298 | Accept the fix | |
299 |
|
299 | |||
300 | $ echo 'y' | $TESTDIR/run-tests.py --with-hg=`which hg` -i |
|
300 | $ echo 'y' | $TESTDIR/run-tests.py --with-hg=`which hg` -i | |
301 |
|
301 | |||
302 | --- $TESTTMP/test-failure.t |
|
302 | --- $TESTTMP/test-failure.t | |
303 | +++ $TESTTMP/test-failure.t.err |
|
303 | +++ $TESTTMP/test-failure.t.err | |
304 | @@ -1,4 +1,4 @@ |
|
304 | @@ -1,4 +1,4 @@ | |
305 | $ echo babar |
|
305 | $ echo babar | |
306 | - rataxes |
|
306 | - rataxes | |
307 | + babar |
|
307 | + babar | |
308 | This is a noop statement so that |
|
308 | This is a noop statement so that | |
309 | this test is still more bytes than success. |
|
309 | this test is still more bytes than success. | |
310 | Accept this change? [n] .. |
|
310 | Accept this change? [n] .. | |
311 | # Ran 2 tests, 0 skipped, 0 warned, 0 failed. |
|
311 | # Ran 2 tests, 0 skipped, 0 warned, 0 failed. | |
312 |
|
312 | |||
313 | $ cat test-failure.t |
|
313 | $ cat test-failure.t | |
314 | $ echo babar |
|
314 | $ echo babar | |
315 | babar |
|
315 | babar | |
316 | This is a noop statement so that |
|
316 | This is a noop statement so that | |
317 | this test is still more bytes than success. |
|
317 | this test is still more bytes than success. | |
318 |
|
318 | |||
319 | (reinstall) |
|
319 | (reinstall) | |
320 | $ mv backup test-failure.t |
|
320 | $ mv backup test-failure.t | |
321 |
|
321 | |||
322 | No Diff |
|
322 | No Diff | |
323 | =============== |
|
323 | =============== | |
324 |
|
324 | |||
325 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --nodiff |
|
325 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --nodiff | |
326 | !. |
|
326 | !. | |
327 | Failed test-failure.t: output changed |
|
327 | Failed test-failure.t: output changed | |
328 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
|
328 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. | |
329 | python hash seed: * (glob) |
|
329 | python hash seed: * (glob) | |
330 | [1] |
|
330 | [1] | |
331 |
|
331 | |||
332 | test for --time |
|
332 | test for --time | |
333 | ================== |
|
333 | ================== | |
334 |
|
334 | |||
335 | $ $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 | |
336 | . |
|
336 | . | |
337 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
|
337 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | |
338 | # Producing time report |
|
338 | # Producing time report | |
339 | cuser csys real Test |
|
339 | cuser csys real Test | |
340 | \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) | |
341 |
|
341 | |||
342 | test for --time with --job enabled |
|
342 | test for --time with --job enabled | |
343 | ==================================== |
|
343 | ==================================== | |
344 |
|
344 | |||
345 | $ $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 | |
346 | . |
|
346 | . | |
347 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
|
347 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | |
348 | # Producing time report |
|
348 | # Producing time report | |
349 | cuser csys real Test |
|
349 | cuser csys real Test | |
350 | \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) | |
351 |
|
351 | |||
352 | Skips |
|
352 | Skips | |
353 | ================ |
|
353 | ================ | |
354 | $ cat > test-skip.t <<EOF |
|
354 | $ cat > test-skip.t <<EOF | |
355 | > $ echo xyzzy |
|
355 | > $ echo xyzzy | |
356 | > #require false |
|
356 | > #require false | |
357 | > EOF |
|
357 | > EOF | |
358 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --nodiff |
|
358 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --nodiff | |
359 | !.s |
|
359 | !.s | |
360 | Skipped test-skip.t: skipped |
|
360 | Skipped test-skip.t: skipped | |
361 | Failed test-failure.t: output changed |
|
361 | Failed test-failure.t: output changed | |
362 | # Ran 2 tests, 1 skipped, 0 warned, 1 failed. |
|
362 | # Ran 2 tests, 1 skipped, 0 warned, 1 failed. | |
363 | python hash seed: * (glob) |
|
363 | python hash seed: * (glob) | |
364 | [1] |
|
364 | [1] | |
365 |
|
365 | |||
366 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --keyword xyzzy |
|
366 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --keyword xyzzy | |
367 | .s |
|
367 | .s | |
368 | Skipped test-skip.t: skipped |
|
368 | Skipped test-skip.t: skipped | |
369 | # Ran 2 tests, 2 skipped, 0 warned, 0 failed. |
|
369 | # Ran 2 tests, 2 skipped, 0 warned, 0 failed. | |
370 |
|
370 | |||
371 | Skips with xml |
|
371 | Skips with xml | |
372 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --keyword xyzzy \ |
|
372 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --keyword xyzzy \ | |
373 | > --xunit=xunit.xml |
|
373 | > --xunit=xunit.xml | |
374 | .s |
|
374 | .s | |
375 | Skipped test-skip.t: skipped |
|
375 | Skipped test-skip.t: skipped | |
376 | # Ran 2 tests, 2 skipped, 0 warned, 0 failed. |
|
376 | # Ran 2 tests, 2 skipped, 0 warned, 0 failed. | |
377 | $ cat xunit.xml |
|
377 | $ cat xunit.xml | |
378 | <?xml version="1.0" encoding="utf-8"?> |
|
378 | <?xml version="1.0" encoding="utf-8"?> | |
379 | <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"> | |
380 | <testcase name="test-success.t" time="*"/> (glob) |
|
380 | <testcase name="test-success.t" time="*"/> (glob) | |
381 | </testsuite> |
|
381 | </testsuite> | |
382 |
|
382 | |||
383 | Missing skips or blacklisted skips don't count as executed: |
|
383 | Missing skips or blacklisted skips don't count as executed: | |
384 | $ echo test-failure.t > blacklist |
|
384 | $ echo test-failure.t > blacklist | |
385 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --blacklist=blacklist \ |
|
385 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --blacklist=blacklist \ | |
386 | > test-failure.t test-bogus.t |
|
386 | > test-failure.t test-bogus.t | |
387 | ss |
|
387 | ss | |
388 | Skipped test-bogus.t: Doesn't exist |
|
388 | Skipped test-bogus.t: Doesn't exist | |
389 | Skipped test-failure.t: blacklisted |
|
389 | Skipped test-failure.t: blacklisted | |
390 | # Ran 0 tests, 2 skipped, 0 warned, 0 failed. |
|
390 | # Ran 0 tests, 2 skipped, 0 warned, 0 failed. | |
391 |
|
391 | |||
392 | #if json |
|
392 | #if json | |
393 |
|
393 | |||
394 | test for --json |
|
394 | test for --json | |
395 | ================== |
|
395 | ================== | |
396 |
|
396 | |||
397 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --json |
|
397 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --json | |
398 |
|
398 | |||
399 | --- $TESTTMP/test-failure.t |
|
399 | --- $TESTTMP/test-failure.t | |
400 | +++ $TESTTMP/test-failure.t.err |
|
400 | +++ $TESTTMP/test-failure.t.err | |
401 | @@ -1,4 +1,4 @@ |
|
401 | @@ -1,4 +1,4 @@ | |
402 | $ echo babar |
|
402 | $ echo babar | |
403 | - rataxes |
|
403 | - rataxes | |
404 | + babar |
|
404 | + babar | |
405 | This is a noop statement so that |
|
405 | This is a noop statement so that | |
406 | this test is still more bytes than success. |
|
406 | this test is still more bytes than success. | |
407 |
|
407 | |||
408 | ERROR: test-failure.t output changed |
|
408 | ERROR: test-failure.t output changed | |
409 | !.s |
|
409 | !.s | |
410 | Skipped test-skip.t: skipped |
|
410 | Skipped test-skip.t: skipped | |
411 | Failed test-failure.t: output changed |
|
411 | Failed test-failure.t: output changed | |
412 | # Ran 2 tests, 1 skipped, 0 warned, 1 failed. |
|
412 | # Ran 2 tests, 1 skipped, 0 warned, 1 failed. | |
413 | python hash seed: * (glob) |
|
413 | python hash seed: * (glob) | |
414 | [1] |
|
414 | [1] | |
415 |
|
415 | |||
416 | $ cat report.json |
|
416 | $ cat report.json | |
417 | testreport ={ |
|
417 | testreport ={ | |
418 | "test-failure.t": [\{] (re) |
|
418 | "test-failure.t": [\{] (re) | |
419 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
419 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
420 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
420 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
421 | "result": "failure", ? (re) |
|
421 | "result": "failure", ? (re) | |
422 | "time": "\s*[\d\.]{4,5}" (re) |
|
422 | "time": "\s*[\d\.]{4,5}" (re) | |
423 | }, ? (re) |
|
423 | }, ? (re) | |
424 | "test-skip.t": { |
|
424 | "test-skip.t": { | |
425 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
425 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
426 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
426 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
427 | "result": "skip", ? (re) |
|
427 | "result": "skip", ? (re) | |
428 | "time": "\s*[\d\.]{4,5}" (re) |
|
428 | "time": "\s*[\d\.]{4,5}" (re) | |
429 | }, ? (re) |
|
429 | }, ? (re) | |
430 | "test-success.t": [\{] (re) |
|
430 | "test-success.t": [\{] (re) | |
431 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
431 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
432 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
432 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
433 | "result": "success", ? (re) |
|
433 | "result": "success", ? (re) | |
434 | "time": "\s*[\d\.]{4,5}" (re) |
|
434 | "time": "\s*[\d\.]{4,5}" (re) | |
435 | } |
|
435 | } | |
436 | } (no-eol) |
|
436 | } (no-eol) | |
437 |
|
437 | |||
438 | #endif |
|
438 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now