Show More
@@ -7,13 +7,20 b' Avoid interference from actual test env:' | |||||
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 |
|
16 | |||
|
17 | Define a helper to avoid the install step | |||
|
18 | ============= | |||
|
19 | $ rt() | |||
|
20 | > { | |||
|
21 | > run-tests.py --with-hg=`which hg` "$@" | |||
|
22 | > } | |||
|
23 | ||||
17 | a succesful test |
|
24 | a succesful test | |
18 | ======================= |
|
25 | ======================= | |
19 |
|
26 | |||
@@ -26,7 +33,7 b' a succesful test' | |||||
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 | |||
@@ -44,7 +51,7 b' failing test' | |||||
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 | |
@@ -73,7 +80,7 b' failing test' | |||||
73 | [1] |
|
80 | [1] | |
74 |
|
81 | |||
75 | test --xunit support |
|
82 | test --xunit support | |
76 |
$ r |
|
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 | |
@@ -129,7 +136,7 b' test --xunit support' | |||||
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 | |
@@ -152,18 +159,18 b' Selecting Tests To Run' | |||||
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 | |
@@ -182,7 +189,7 b' failed' | |||||
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 | |
@@ -208,7 +215,7 b" it's actually the same test being report" | |||||
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 |
$ r |
|
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 | ! | |
@@ -224,7 +231,7 b" it's actually the same test being report" | |||||
224 | Running In Debug Mode |
|
231 | Running In Debug Mode | |
225 | ====================== |
|
232 | ====================== | |
226 |
|
233 | |||
227 |
$ r |
|
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 | |
@@ -250,7 +257,7 b' Parallel runs' | |||||
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 |
$ r |
|
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) | |
@@ -262,7 +269,7 b' failures in parallel with --first should' | |||||
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) | |
@@ -292,7 +299,7 b' Interactive run' | |||||
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 | |
@@ -318,7 +325,7 b' Refuse the fix' | |||||
318 |
|
325 | |||
319 | Interactive with custom view |
|
326 | Interactive with custom view | |
320 |
|
327 | |||
321 |
$ echo 'n' | r |
|
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 | |
@@ -330,7 +337,7 b' Interactive with custom view' | |||||
330 |
|
337 | |||
331 | View the fix |
|
338 | View the fix | |
332 |
|
339 | |||
333 |
$ echo 'y' | r |
|
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 | |
@@ -348,8 +355,7 b' Accept the fix' | |||||
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 | |
@@ -361,9 +367,9 b' Accept the fix' | |||||
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. | |
@@ -386,7 +392,7 b' Accept the fix' | |||||
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. | |
@@ -394,7 +400,7 b' No Diff' | |||||
394 | [1] |
|
400 | [1] | |
395 |
|
401 | |||
396 | test --tmpdir support |
|
402 | test --tmpdir support | |
397 |
$ r |
|
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) | |
@@ -410,15 +416,14 b' timeouts' | |||||
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 |
$ r |
|
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 | |
@@ -430,7 +435,7 b' timeouts' | |||||
430 | test for --time |
|
435 | test for --time | |
431 | ================== |
|
436 | ================== | |
432 |
|
437 | |||
433 |
$ r |
|
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 | |
@@ -440,7 +445,7 b' test for --time' | |||||
440 | test for --time with --job enabled |
|
445 | test for --time with --job enabled | |
441 | ==================================== |
|
446 | ==================================== | |
442 |
|
447 | |||
443 |
$ r |
|
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 | |
@@ -453,7 +458,7 b' Skips' | |||||
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 | |
@@ -461,13 +466,13 b' Skips' | |||||
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 |
$ r |
|
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 | |
@@ -480,7 +485,7 b' Skips with xml' | |||||
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 |
$ r |
|
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 | |
@@ -492,7 +497,7 b" Missing skips or blacklisted skips don't" | |||||
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 | |
@@ -542,7 +547,7 b' test for --json' | |||||
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 | r |
|
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 | |
@@ -594,7 +599,7 b' backslash on end of line with glob match' | |||||
594 | > foo * \ (glob) |
|
599 | > foo * \ (glob) | |
595 | > EOF |
|
600 | > EOF | |
596 |
|
601 | |||
597 |
$ r |
|
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 | |||
@@ -614,7 +619,7 b' Mercurial source tree.' | |||||
614 | > $ echo foo |
|
619 | > $ echo foo | |
615 | > foo |
|
620 | > foo | |
616 | > EOF |
|
621 | > EOF | |
617 |
$ r |
|
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 | |||
@@ -637,7 +642,7 b' running is placed.' | |||||
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 |
$ r |
|
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 | |||
@@ -654,7 +659,7 b' test that TESTDIR is referred in PATH' | |||||
654 | > $ custom-command.sh |
|
659 | > $ custom-command.sh | |
655 | > hello world |
|
660 | > hello world | |
656 | > EOF |
|
661 | > EOF | |
657 |
$ r |
|
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 | |||
@@ -666,10 +671,10 b' test support for --allow-slow-tests' | |||||
666 | > $ echo pass |
|
671 | > $ echo pass | |
667 | > pass |
|
672 | > pass | |
668 | > EOF |
|
673 | > EOF | |
669 |
$ r |
|
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 |
$ r |
|
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. |
General Comments 0
You need to be logged in to leave comments.
Login now