Mercurial > hg-stable
comparison tests/test-run-tests.t @ 27395:0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
At several seconds each, this is significantly slowing down the test.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 06 Dec 2015 15:14:01 -0600 |
parents | a40b623e6380 |
children | 6ff90d618d72 |
comparison
equal
deleted
inserted
replaced
27394:b4d7743e174a | 27395:0622d6e134fb |
---|---|
5 $ unset HGTEST_JOBS | 5 $ unset HGTEST_JOBS |
6 $ unset HGTEST_TIMEOUT | 6 $ unset HGTEST_TIMEOUT |
7 $ unset HGTEST_PORT | 7 $ unset HGTEST_PORT |
8 $ unset HGTEST_SHELL | 8 $ unset HGTEST_SHELL |
9 | 9 |
10 Smoke test | 10 Smoke test with install |
11 ============ | 11 ============ |
12 | 12 |
13 $ run-tests.py $HGTEST_RUN_TESTS_PURE | 13 $ run-tests.py $HGTEST_RUN_TESTS_PURE -l |
14 | 14 |
15 # Ran 0 tests, 0 skipped, 0 warned, 0 failed. | 15 # Ran 0 tests, 0 skipped, 0 warned, 0 failed. |
16 | |
17 Define a helper to avoid the install step | |
18 ============= | |
19 $ rt() | |
20 > { | |
21 > run-tests.py --with-hg=`which hg` "$@" | |
22 > } | |
16 | 23 |
17 a succesful test | 24 a succesful test |
18 ======================= | 25 ======================= |
19 | 26 |
20 $ cat > test-success.t << EOF | 27 $ cat > test-success.t << EOF |
24 > never happens (?) | 31 > never happens (?) |
25 > xyzzy | 32 > xyzzy |
26 > nor this (?) | 33 > nor this (?) |
27 > EOF | 34 > EOF |
28 | 35 |
29 $ run-tests.py --with-hg=`which hg` | 36 $ rt |
30 . | 37 . |
31 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | 38 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
32 | 39 |
33 failing test | 40 failing test |
34 ================== | 41 ================== |
42 | 49 |
43 >>> fh = open('test-failure-unicode.t', 'wb') | 50 >>> fh = open('test-failure-unicode.t', 'wb') |
44 >>> fh.write(u' $ echo babar\u03b1\n'.encode('utf-8')) and None | 51 >>> fh.write(u' $ echo babar\u03b1\n'.encode('utf-8')) and None |
45 >>> fh.write(u' l\u03b5\u03b5t\n'.encode('utf-8')) and None | 52 >>> fh.write(u' l\u03b5\u03b5t\n'.encode('utf-8')) and None |
46 | 53 |
47 $ run-tests.py --with-hg=`which hg` | 54 $ rt |
48 | 55 |
49 --- $TESTTMP/test-failure.t | 56 --- $TESTTMP/test-failure.t |
50 +++ $TESTTMP/test-failure.t.err | 57 +++ $TESTTMP/test-failure.t.err |
51 @@ -1,4 +1,4 @@ | 58 @@ -1,4 +1,4 @@ |
52 $ echo babar | 59 $ echo babar |
71 # Ran 3 tests, 0 skipped, 0 warned, 2 failed. | 78 # Ran 3 tests, 0 skipped, 0 warned, 2 failed. |
72 python hash seed: * (glob) | 79 python hash seed: * (glob) |
73 [1] | 80 [1] |
74 | 81 |
75 test --xunit support | 82 test --xunit support |
76 $ run-tests.py --with-hg=`which hg` --xunit=xunit.xml | 83 $ rt --xunit=xunit.xml |
77 | 84 |
78 --- $TESTTMP/test-failure.t | 85 --- $TESTTMP/test-failure.t |
79 +++ $TESTTMP/test-failure.t.err | 86 +++ $TESTTMP/test-failure.t.err |
80 @@ -1,4 +1,4 @@ | 87 @@ -1,4 +1,4 @@ |
81 $ echo babar | 88 $ echo babar |
127 $ rm test-failure-unicode.t | 134 $ rm test-failure-unicode.t |
128 | 135 |
129 test for --retest | 136 test for --retest |
130 ==================== | 137 ==================== |
131 | 138 |
132 $ run-tests.py --with-hg=`which hg` --retest | 139 $ rt --retest |
133 | 140 |
134 --- $TESTTMP/test-failure.t | 141 --- $TESTTMP/test-failure.t |
135 +++ $TESTTMP/test-failure.t.err | 142 +++ $TESTTMP/test-failure.t.err |
136 @@ -1,4 +1,4 @@ | 143 @@ -1,4 +1,4 @@ |
137 $ echo babar | 144 $ echo babar |
150 Selecting Tests To Run | 157 Selecting Tests To Run |
151 ====================== | 158 ====================== |
152 | 159 |
153 successful | 160 successful |
154 | 161 |
155 $ run-tests.py --with-hg=`which hg` test-success.t | 162 $ rt test-success.t |
156 . | 163 . |
157 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | 164 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
158 | 165 |
159 success w/ keyword | 166 success w/ keyword |
160 $ run-tests.py --with-hg=`which hg` -k xyzzy | 167 $ rt -k xyzzy |
161 . | 168 . |
162 # Ran 2 tests, 1 skipped, 0 warned, 0 failed. | 169 # Ran 2 tests, 1 skipped, 0 warned, 0 failed. |
163 | 170 |
164 failed | 171 failed |
165 | 172 |
166 $ run-tests.py --with-hg=`which hg` test-failure.t | 173 $ rt test-failure.t |
167 | 174 |
168 --- $TESTTMP/test-failure.t | 175 --- $TESTTMP/test-failure.t |
169 +++ $TESTTMP/test-failure.t.err | 176 +++ $TESTTMP/test-failure.t.err |
170 @@ -1,4 +1,4 @@ | 177 @@ -1,4 +1,4 @@ |
171 $ echo babar | 178 $ echo babar |
180 # Ran 1 tests, 0 skipped, 0 warned, 1 failed. | 187 # Ran 1 tests, 0 skipped, 0 warned, 1 failed. |
181 python hash seed: * (glob) | 188 python hash seed: * (glob) |
182 [1] | 189 [1] |
183 | 190 |
184 failure w/ keyword | 191 failure w/ keyword |
185 $ run-tests.py --with-hg=`which hg` -k rataxes | 192 $ rt -k rataxes |
186 | 193 |
187 --- $TESTTMP/test-failure.t | 194 --- $TESTTMP/test-failure.t |
188 +++ $TESTTMP/test-failure.t.err | 195 +++ $TESTTMP/test-failure.t.err |
189 @@ -1,4 +1,4 @@ | 196 @@ -1,4 +1,4 @@ |
190 $ echo babar | 197 $ echo babar |
206 it's actually the same test being reported for failure twice. | 213 it's actually the same test being reported for failure twice. |
207 | 214 |
208 $ cat > test-serve-fail.t <<EOF | 215 $ cat > test-serve-fail.t <<EOF |
209 > $ echo 'abort: child process failed to start blah' | 216 > $ echo 'abort: child process failed to start blah' |
210 > EOF | 217 > EOF |
211 $ run-tests.py --with-hg=`which hg` test-serve-fail.t | 218 $ rt test-serve-fail.t |
212 | 219 |
213 ERROR: test-serve-fail.t output changed | 220 ERROR: test-serve-fail.t output changed |
214 ! | 221 ! |
215 ERROR: test-serve-fail.t output changed | 222 ERROR: test-serve-fail.t output changed |
216 ! | 223 ! |
222 $ rm test-serve-fail.t | 229 $ rm test-serve-fail.t |
223 | 230 |
224 Running In Debug Mode | 231 Running In Debug Mode |
225 ====================== | 232 ====================== |
226 | 233 |
227 $ run-tests.py --with-hg=`which hg` --debug 2>&1 | grep -v pwd | 234 $ rt --debug 2>&1 | grep -v pwd |
228 + echo *SALT* 0 0 (glob) | 235 + echo *SALT* 0 0 (glob) |
229 *SALT* 0 0 (glob) | 236 *SALT* 0 0 (glob) |
230 + echo babar | 237 + echo babar |
231 babar | 238 babar |
232 + echo *SALT* 4 0 (glob) | 239 + echo *SALT* 4 0 (glob) |
248 ============== | 255 ============== |
249 | 256 |
250 (duplicate the failing test to get predictable output) | 257 (duplicate the failing test to get predictable output) |
251 $ cp test-failure.t test-failure-copy.t | 258 $ cp test-failure.t test-failure-copy.t |
252 | 259 |
253 $ run-tests.py --with-hg=`which hg` --jobs 2 test-failure*.t -n | 260 $ rt --jobs 2 test-failure*.t -n |
254 !! | 261 !! |
255 Failed test-failure*.t: output changed (glob) | 262 Failed test-failure*.t: output changed (glob) |
256 Failed test-failure*.t: output changed (glob) | 263 Failed test-failure*.t: output changed (glob) |
257 # Ran 2 tests, 0 skipped, 0 warned, 2 failed. | 264 # Ran 2 tests, 0 skipped, 0 warned, 2 failed. |
258 python hash seed: * (glob) | 265 python hash seed: * (glob) |
260 | 267 |
261 failures in parallel with --first should only print one failure | 268 failures in parallel with --first should only print one failure |
262 >>> f = open('test-nothing.t', 'w') | 269 >>> f = open('test-nothing.t', 'w') |
263 >>> f.write('foo\n' * 1024) and None | 270 >>> f.write('foo\n' * 1024) and None |
264 >>> f.write(' $ sleep 1') and None | 271 >>> f.write(' $ sleep 1') and None |
265 $ run-tests.py --with-hg=`which hg` --jobs 2 --first | 272 $ rt --jobs 2 --first |
266 | 273 |
267 --- $TESTTMP/test-failure*.t (glob) | 274 --- $TESTTMP/test-failure*.t (glob) |
268 +++ $TESTTMP/test-failure*.t.err (glob) | 275 +++ $TESTTMP/test-failure*.t.err (glob) |
269 @@ -1,4 +1,4 @@ | 276 @@ -1,4 +1,4 @@ |
270 $ echo babar | 277 $ echo babar |
290 (backup the failing test) | 297 (backup the failing test) |
291 $ cp test-failure.t backup | 298 $ cp test-failure.t backup |
292 | 299 |
293 Refuse the fix | 300 Refuse the fix |
294 | 301 |
295 $ echo 'n' | run-tests.py --with-hg=`which hg` -i | 302 $ echo 'n' | rt -i |
296 | 303 |
297 --- $TESTTMP/test-failure.t | 304 --- $TESTTMP/test-failure.t |
298 +++ $TESTTMP/test-failure.t.err | 305 +++ $TESTTMP/test-failure.t.err |
299 @@ -1,4 +1,4 @@ | 306 @@ -1,4 +1,4 @@ |
300 $ echo babar | 307 $ echo babar |
316 This is a noop statement so that | 323 This is a noop statement so that |
317 this test is still more bytes than success. | 324 this test is still more bytes than success. |
318 | 325 |
319 Interactive with custom view | 326 Interactive with custom view |
320 | 327 |
321 $ echo 'n' | run-tests.py --with-hg=`which hg` -i --view echo | 328 $ echo 'n' | rt -i --view echo |
322 $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) | 329 $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) |
323 Accept this change? [n]* (glob) | 330 Accept this change? [n]* (glob) |
324 ERROR: test-failure.t output changed | 331 ERROR: test-failure.t output changed |
325 !. | 332 !. |
326 Failed test-failure.t: output changed | 333 Failed test-failure.t: output changed |
328 python hash seed: * (glob) | 335 python hash seed: * (glob) |
329 [1] | 336 [1] |
330 | 337 |
331 View the fix | 338 View the fix |
332 | 339 |
333 $ echo 'y' | run-tests.py --with-hg=`which hg` --view echo | 340 $ echo 'y' | rt --view echo |
334 $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) | 341 $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) |
335 | 342 |
336 ERROR: test-failure.t output changed | 343 ERROR: test-failure.t output changed |
337 !. | 344 !. |
338 Failed test-failure.t: output changed | 345 Failed test-failure.t: output changed |
346 $ echo " saved backup bundle to \$TESTTMP/foo.hg" >> test-failure.t | 353 $ echo " saved backup bundle to \$TESTTMP/foo.hg" >> test-failure.t |
347 $ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t | 354 $ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t |
348 $ echo " saved backup bundle to \$TESTTMP/foo.hg (glob)" >> test-failure.t | 355 $ echo " saved backup bundle to \$TESTTMP/foo.hg (glob)" >> test-failure.t |
349 $ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t | 356 $ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t |
350 $ echo " saved backup bundle to \$TESTTMP/*.hg (glob)" >> test-failure.t | 357 $ echo " saved backup bundle to \$TESTTMP/*.hg (glob)" >> test-failure.t |
351 $ echo 'y' | run-tests.py --with-hg=`which hg` -i 2>&1 | \ | 358 $ echo 'y' | rt -i 2>&1 |
352 > sed -e 's,(glob)$,&<,g' | |
353 | 359 |
354 --- $TESTTMP/test-failure.t | 360 --- $TESTTMP/test-failure.t |
355 +++ $TESTTMP/test-failure.t.err | 361 +++ $TESTTMP/test-failure.t.err |
356 @@ -1,9 +1,9 @@ | 362 @@ -1,9 +1,9 @@ |
357 $ echo babar | 363 $ echo babar |
359 + babar | 365 + babar |
360 This is a noop statement so that | 366 This is a noop statement so that |
361 this test is still more bytes than success. | 367 this test is still more bytes than success. |
362 $ echo 'saved backup bundle to $TESTTMP/foo.hg' | 368 $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
363 - saved backup bundle to $TESTTMP/foo.hg | 369 - saved backup bundle to $TESTTMP/foo.hg |
364 + saved backup bundle to $TESTTMP/foo.hg (glob)< | 370 + saved backup bundle to $TESTTMP/foo.hg* (glob) |
365 $ echo 'saved backup bundle to $TESTTMP/foo.hg' | 371 $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
366 saved backup bundle to $TESTTMP/foo.hg (glob)< | 372 saved backup bundle to $TESTTMP/foo.hg* (glob) |
367 $ echo 'saved backup bundle to $TESTTMP/foo.hg' | 373 $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
368 Accept this change? [n] .. | 374 Accept this change? [n] .. |
369 # Ran 2 tests, 0 skipped, 0 warned, 0 failed. | 375 # Ran 2 tests, 0 skipped, 0 warned, 0 failed. |
370 | 376 |
371 $ sed -e 's,(glob)$,&<,g' test-failure.t | 377 $ sed -e 's,(glob)$,&<,g' test-failure.t |
384 $ mv backup test-failure.t | 390 $ mv backup test-failure.t |
385 | 391 |
386 No Diff | 392 No Diff |
387 =============== | 393 =============== |
388 | 394 |
389 $ run-tests.py --with-hg=`which hg` --nodiff | 395 $ rt --nodiff |
390 !. | 396 !. |
391 Failed test-failure.t: output changed | 397 Failed test-failure.t: output changed |
392 # Ran 2 tests, 0 skipped, 0 warned, 1 failed. | 398 # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
393 python hash seed: * (glob) | 399 python hash seed: * (glob) |
394 [1] | 400 [1] |
395 | 401 |
396 test --tmpdir support | 402 test --tmpdir support |
397 $ run-tests.py --with-hg=`which hg` --tmpdir=$TESTTMP/keep test-success.t | 403 $ rt --tmpdir=$TESTTMP/keep test-success.t |
398 | 404 |
399 Keeping testtmp dir: $TESTTMP/keep/child1/test-success.t (glob) | 405 Keeping testtmp dir: $TESTTMP/keep/child1/test-success.t (glob) |
400 Keeping threadtmp dir: $TESTTMP/keep/child1 (glob) | 406 Keeping threadtmp dir: $TESTTMP/keep/child1 (glob) |
401 . | 407 . |
402 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | 408 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
408 > $ echo pass | 414 > $ echo pass |
409 > pass | 415 > pass |
410 > EOF | 416 > EOF |
411 > echo '#require slow' > test-slow-timeout.t | 417 > echo '#require slow' > test-slow-timeout.t |
412 > cat test-timeout.t >> test-slow-timeout.t | 418 > cat test-timeout.t >> test-slow-timeout.t |
413 $ run-tests.py --with-hg=`which hg` --timeout=1 --slowtimeout=3 \ | 419 $ rt --timeout=1 --slowtimeout=3 test-timeout.t test-slow-timeout.t |
414 > test-timeout.t test-slow-timeout.t | |
415 st | 420 st |
416 Skipped test-slow-timeout.t: skipped | 421 Skipped test-slow-timeout.t: skipped |
417 Failed test-timeout.t: timed out | 422 Failed test-timeout.t: timed out |
418 # Ran 1 tests, 1 skipped, 0 warned, 1 failed. | 423 # Ran 1 tests, 1 skipped, 0 warned, 1 failed. |
419 python hash seed: * (glob) | 424 python hash seed: * (glob) |
420 [1] | 425 [1] |
421 $ run-tests.py --with-hg=`which hg` --timeout=1 --slowtimeout=3 \ | 426 $ rt --timeout=1 --slowtimeout=3 \ |
422 > test-timeout.t test-slow-timeout.t --allow-slow-tests | 427 > test-timeout.t test-slow-timeout.t --allow-slow-tests |
423 .t | 428 .t |
424 Failed test-timeout.t: timed out | 429 Failed test-timeout.t: timed out |
425 # Ran 2 tests, 0 skipped, 0 warned, 1 failed. | 430 # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
426 python hash seed: * (glob) | 431 python hash seed: * (glob) |
428 $ rm test-timeout.t test-slow-timeout.t | 433 $ rm test-timeout.t test-slow-timeout.t |
429 | 434 |
430 test for --time | 435 test for --time |
431 ================== | 436 ================== |
432 | 437 |
433 $ run-tests.py --with-hg=`which hg` test-success.t --time | 438 $ rt test-success.t --time |
434 . | 439 . |
435 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | 440 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
436 # Producing time report | 441 # Producing time report |
437 start end cuser csys real Test | 442 start end cuser csys real Test |
438 \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) | 443 \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) |
439 | 444 |
440 test for --time with --job enabled | 445 test for --time with --job enabled |
441 ==================================== | 446 ==================================== |
442 | 447 |
443 $ run-tests.py --with-hg=`which hg` test-success.t --time --jobs 2 | 448 $ rt test-success.t --time --jobs 2 |
444 . | 449 . |
445 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | 450 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
446 # Producing time report | 451 # Producing time report |
447 start end cuser csys real Test | 452 start end cuser csys real Test |
448 \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) | 453 \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) |
451 ================ | 456 ================ |
452 $ cat > test-skip.t <<EOF | 457 $ cat > test-skip.t <<EOF |
453 > $ echo xyzzy | 458 > $ echo xyzzy |
454 > #require false | 459 > #require false |
455 > EOF | 460 > EOF |
456 $ run-tests.py --with-hg=`which hg` --nodiff | 461 $ rt --nodiff |
457 !.s | 462 !.s |
458 Skipped test-skip.t: skipped | 463 Skipped test-skip.t: skipped |
459 Failed test-failure.t: output changed | 464 Failed test-failure.t: output changed |
460 # Ran 2 tests, 1 skipped, 0 warned, 1 failed. | 465 # Ran 2 tests, 1 skipped, 0 warned, 1 failed. |
461 python hash seed: * (glob) | 466 python hash seed: * (glob) |
462 [1] | 467 [1] |
463 | 468 |
464 $ run-tests.py --with-hg=`which hg` --keyword xyzzy | 469 $ rt --keyword xyzzy |
465 .s | 470 .s |
466 Skipped test-skip.t: skipped | 471 Skipped test-skip.t: skipped |
467 # Ran 2 tests, 2 skipped, 0 warned, 0 failed. | 472 # Ran 2 tests, 2 skipped, 0 warned, 0 failed. |
468 | 473 |
469 Skips with xml | 474 Skips with xml |
470 $ run-tests.py --with-hg=`which hg` --keyword xyzzy \ | 475 $ rt --keyword xyzzy \ |
471 > --xunit=xunit.xml | 476 > --xunit=xunit.xml |
472 .s | 477 .s |
473 Skipped test-skip.t: skipped | 478 Skipped test-skip.t: skipped |
474 # Ran 2 tests, 2 skipped, 0 warned, 0 failed. | 479 # Ran 2 tests, 2 skipped, 0 warned, 0 failed. |
475 $ cat xunit.xml | 480 $ cat xunit.xml |
478 <testcase name="test-success.t" time="*"/> (glob) | 483 <testcase name="test-success.t" time="*"/> (glob) |
479 </testsuite> | 484 </testsuite> |
480 | 485 |
481 Missing skips or blacklisted skips don't count as executed: | 486 Missing skips or blacklisted skips don't count as executed: |
482 $ echo test-failure.t > blacklist | 487 $ echo test-failure.t > blacklist |
483 $ run-tests.py --with-hg=`which hg` --blacklist=blacklist \ | 488 $ rt --blacklist=blacklist \ |
484 > test-failure.t test-bogus.t | 489 > test-failure.t test-bogus.t |
485 ss | 490 ss |
486 Skipped test-bogus.t: Doesn't exist | 491 Skipped test-bogus.t: Doesn't exist |
487 Skipped test-failure.t: blacklisted | 492 Skipped test-failure.t: blacklisted |
488 # Ran 0 tests, 2 skipped, 0 warned, 0 failed. | 493 # Ran 0 tests, 2 skipped, 0 warned, 0 failed. |
490 #if json | 495 #if json |
491 | 496 |
492 test for --json | 497 test for --json |
493 ================== | 498 ================== |
494 | 499 |
495 $ run-tests.py --with-hg=`which hg` --json | 500 $ rt --json |
496 | 501 |
497 --- $TESTTMP/test-failure.t | 502 --- $TESTTMP/test-failure.t |
498 +++ $TESTTMP/test-failure.t.err | 503 +++ $TESTTMP/test-failure.t.err |
499 @@ -1,4 +1,4 @@ | 504 @@ -1,4 +1,4 @@ |
500 $ echo babar | 505 $ echo babar |
540 } (no-eol) | 545 } (no-eol) |
541 | 546 |
542 Test that failed test accepted through interactive are properly reported: | 547 Test that failed test accepted through interactive are properly reported: |
543 | 548 |
544 $ cp test-failure.t backup | 549 $ cp test-failure.t backup |
545 $ echo y | run-tests.py --with-hg=`which hg` --json -i | 550 $ echo y | rt --json -i |
546 | 551 |
547 --- $TESTTMP/test-failure.t | 552 --- $TESTTMP/test-failure.t |
548 +++ $TESTTMP/test-failure.t.err | 553 +++ $TESTTMP/test-failure.t.err |
549 @@ -1,4 +1,4 @@ | 554 @@ -1,4 +1,4 @@ |
550 $ echo babar | 555 $ echo babar |
592 $ cat > test-glob-backslash.t << EOF | 597 $ cat > test-glob-backslash.t << EOF |
593 > $ echo 'foo bar \\' | 598 > $ echo 'foo bar \\' |
594 > foo * \ (glob) | 599 > foo * \ (glob) |
595 > EOF | 600 > EOF |
596 | 601 |
597 $ run-tests.py --with-hg=`which hg` test-glob-backslash.t | 602 $ rt test-glob-backslash.t |
598 . | 603 . |
599 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | 604 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
600 | 605 |
601 $ rm -f test-glob-backslash.t | 606 $ rm -f test-glob-backslash.t |
602 | 607 |
612 $ cat > test-hghave.t <<EOF | 617 $ cat > test-hghave.t <<EOF |
613 > #require true | 618 > #require true |
614 > $ echo foo | 619 > $ echo foo |
615 > foo | 620 > foo |
616 > EOF | 621 > EOF |
617 $ run-tests.py $HGTEST_RUN_TESTS_PURE test-hghave.t | 622 $ rt $HGTEST_RUN_TESTS_PURE test-hghave.t |
618 . | 623 . |
619 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | 624 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
620 | 625 |
621 test that RUNTESTDIR refers the directory, in which `run-tests.py` now | 626 test that RUNTESTDIR refers the directory, in which `run-tests.py` now |
622 running is placed. | 627 running is placed. |
635 > $ head -n 3 "\$RUNTESTDIR"/../contrib/check-code.py | 640 > $ head -n 3 "\$RUNTESTDIR"/../contrib/check-code.py |
636 > #!/usr/bin/env python | 641 > #!/usr/bin/env python |
637 > # | 642 > # |
638 > # check-code - a style and portability checker for Mercurial | 643 > # check-code - a style and portability checker for Mercurial |
639 > EOF | 644 > EOF |
640 $ run-tests.py $HGTEST_RUN_TESTS_PURE test-runtestdir.t | 645 $ rt $HGTEST_RUN_TESTS_PURE test-runtestdir.t |
641 . | 646 . |
642 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | 647 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
643 | 648 |
644 #if execbit | 649 #if execbit |
645 | 650 |
652 $ chmod +x custom-command.sh | 657 $ chmod +x custom-command.sh |
653 $ cat > test-testdir-path.t <<EOF | 658 $ cat > test-testdir-path.t <<EOF |
654 > $ custom-command.sh | 659 > $ custom-command.sh |
655 > hello world | 660 > hello world |
656 > EOF | 661 > EOF |
657 $ run-tests.py $HGTEST_RUN_TESTS_PURE test-testdir-path.t | 662 $ rt $HGTEST_RUN_TESTS_PURE test-testdir-path.t |
658 . | 663 . |
659 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | 664 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
660 | 665 |
661 #endif | 666 #endif |
662 | 667 |
664 $ cat > test-very-slow-test.t <<EOF | 669 $ cat > test-very-slow-test.t <<EOF |
665 > #require slow | 670 > #require slow |
666 > $ echo pass | 671 > $ echo pass |
667 > pass | 672 > pass |
668 > EOF | 673 > EOF |
669 $ run-tests.py $HGTEST_RUN_TESTS_PURE test-very-slow-test.t | 674 $ rt $HGTEST_RUN_TESTS_PURE test-very-slow-test.t |
670 s | 675 s |
671 Skipped test-very-slow-test.t: skipped | 676 Skipped test-very-slow-test.t: skipped |
672 # Ran 0 tests, 1 skipped, 0 warned, 0 failed. | 677 # Ran 0 tests, 1 skipped, 0 warned, 0 failed. |
673 $ run-tests.py $HGTEST_RUN_TESTS_PURE --allow-slow-tests test-very-slow-test.t | 678 $ rt $HGTEST_RUN_TESTS_PURE --allow-slow-tests test-very-slow-test.t |
674 . | 679 . |
675 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. | 680 # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |