Show More
@@ -7,13 +7,20 b' Avoid interference from actual test env:' | |||
|
7 | 7 | $ unset HGTEST_PORT |
|
8 | 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 | 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 | 24 | a succesful test |
|
18 | 25 | ======================= |
|
19 | 26 | |
@@ -26,7 +33,7 b' a succesful test' | |||
|
26 | 33 | > nor this (?) |
|
27 | 34 | > EOF |
|
28 | 35 | |
|
29 | $ run-tests.py --with-hg=`which hg` | |
|
36 | $ rt | |
|
30 | 37 | . |
|
31 | 38 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
|
32 | 39 | |
@@ -44,7 +51,7 b' failing test' | |||
|
44 | 51 | >>> fh.write(u' $ echo babar\u03b1\n'.encode('utf-8')) and None |
|
45 | 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 | 56 | --- $TESTTMP/test-failure.t |
|
50 | 57 | +++ $TESTTMP/test-failure.t.err |
@@ -73,7 +80,7 b' failing test' | |||
|
73 | 80 | [1] |
|
74 | 81 | |
|
75 | 82 | test --xunit support |
|
76 |
$ r |
|
|
83 | $ rt --xunit=xunit.xml | |
|
77 | 84 | |
|
78 | 85 | --- $TESTTMP/test-failure.t |
|
79 | 86 | +++ $TESTTMP/test-failure.t.err |
@@ -129,7 +136,7 b' test --xunit support' | |||
|
129 | 136 | test for --retest |
|
130 | 137 | ==================== |
|
131 | 138 | |
|
132 | $ run-tests.py --with-hg=`which hg` --retest | |
|
139 | $ rt --retest | |
|
133 | 140 | |
|
134 | 141 | --- $TESTTMP/test-failure.t |
|
135 | 142 | +++ $TESTTMP/test-failure.t.err |
@@ -152,18 +159,18 b' Selecting Tests To Run' | |||
|
152 | 159 | |
|
153 | 160 | successful |
|
154 | 161 | |
|
155 | $ run-tests.py --with-hg=`which hg` test-success.t | |
|
162 | $ rt test-success.t | |
|
156 | 163 | . |
|
157 | 164 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
|
158 | 165 | |
|
159 | 166 | success w/ keyword |
|
160 | $ run-tests.py --with-hg=`which hg` -k xyzzy | |
|
167 | $ rt -k xyzzy | |
|
161 | 168 | . |
|
162 | 169 | # Ran 2 tests, 1 skipped, 0 warned, 0 failed. |
|
163 | 170 | |
|
164 | 171 | failed |
|
165 | 172 | |
|
166 | $ run-tests.py --with-hg=`which hg` test-failure.t | |
|
173 | $ rt test-failure.t | |
|
167 | 174 | |
|
168 | 175 | --- $TESTTMP/test-failure.t |
|
169 | 176 | +++ $TESTTMP/test-failure.t.err |
@@ -182,7 +189,7 b' failed' | |||
|
182 | 189 | [1] |
|
183 | 190 | |
|
184 | 191 | failure w/ keyword |
|
185 | $ run-tests.py --with-hg=`which hg` -k rataxes | |
|
192 | $ rt -k rataxes | |
|
186 | 193 | |
|
187 | 194 | --- $TESTTMP/test-failure.t |
|
188 | 195 | +++ $TESTTMP/test-failure.t.err |
@@ -208,7 +215,7 b" it's actually the same test being report" | |||
|
208 | 215 | $ cat > test-serve-fail.t <<EOF |
|
209 | 216 | > $ echo 'abort: child process failed to start blah' |
|
210 | 217 | > EOF |
|
211 |
$ r |
|
|
218 | $ rt test-serve-fail.t | |
|
212 | 219 | |
|
213 | 220 | ERROR: test-serve-fail.t output changed |
|
214 | 221 | ! |
@@ -224,7 +231,7 b" it's actually the same test being report" | |||
|
224 | 231 | Running In Debug Mode |
|
225 | 232 | ====================== |
|
226 | 233 | |
|
227 |
$ r |
|
|
234 | $ rt --debug 2>&1 | grep -v pwd | |
|
228 | 235 | + echo *SALT* 0 0 (glob) |
|
229 | 236 | *SALT* 0 0 (glob) |
|
230 | 237 | + echo babar |
@@ -250,7 +257,7 b' Parallel runs' | |||
|
250 | 257 | (duplicate the failing test to get predictable output) |
|
251 | 258 | $ cp test-failure.t test-failure-copy.t |
|
252 | 259 | |
|
253 |
$ r |
|
|
260 | $ rt --jobs 2 test-failure*.t -n | |
|
254 | 261 | !! |
|
255 | 262 | Failed test-failure*.t: output changed (glob) |
|
256 | 263 | Failed test-failure*.t: output changed (glob) |
@@ -262,7 +269,7 b' failures in parallel with --first should' | |||
|
262 | 269 | >>> f = open('test-nothing.t', 'w') |
|
263 | 270 | >>> f.write('foo\n' * 1024) and None |
|
264 | 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 | 274 | --- $TESTTMP/test-failure*.t (glob) |
|
268 | 275 | +++ $TESTTMP/test-failure*.t.err (glob) |
@@ -292,7 +299,7 b' Interactive run' | |||
|
292 | 299 | |
|
293 | 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 | 304 | --- $TESTTMP/test-failure.t |
|
298 | 305 | +++ $TESTTMP/test-failure.t.err |
@@ -318,7 +325,7 b' Refuse the fix' | |||
|
318 | 325 | |
|
319 | 326 | Interactive with custom view |
|
320 | 327 | |
|
321 |
$ echo 'n' | r |
|
|
328 | $ echo 'n' | rt -i --view echo | |
|
322 | 329 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) |
|
323 | 330 | Accept this change? [n]* (glob) |
|
324 | 331 | ERROR: test-failure.t output changed |
@@ -330,7 +337,7 b' Interactive with custom view' | |||
|
330 | 337 | |
|
331 | 338 | View the fix |
|
332 | 339 | |
|
333 |
$ echo 'y' | r |
|
|
340 | $ echo 'y' | rt --view echo | |
|
334 | 341 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) |
|
335 | 342 | |
|
336 | 343 | ERROR: test-failure.t output changed |
@@ -348,8 +355,7 b' Accept the fix' | |||
|
348 | 355 | $ echo " saved backup bundle to \$TESTTMP/foo.hg (glob)" >> test-failure.t |
|
349 | 356 | $ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t |
|
350 | 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 | \ | |
|
352 | > sed -e 's,(glob)$,&<,g' | |
|
358 | $ echo 'y' | rt -i 2>&1 | |
|
353 | 359 | |
|
354 | 360 | --- $TESTTMP/test-failure.t |
|
355 | 361 | +++ $TESTTMP/test-failure.t.err |
@@ -361,9 +367,9 b' Accept the fix' | |||
|
361 | 367 | this test is still more bytes than success. |
|
362 | 368 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
|
363 | 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 | 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 | 373 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
|
368 | 374 | Accept this change? [n] .. |
|
369 | 375 | # Ran 2 tests, 0 skipped, 0 warned, 0 failed. |
@@ -386,7 +392,7 b' Accept the fix' | |||
|
386 | 392 | No Diff |
|
387 | 393 | =============== |
|
388 | 394 | |
|
389 | $ run-tests.py --with-hg=`which hg` --nodiff | |
|
395 | $ rt --nodiff | |
|
390 | 396 | !. |
|
391 | 397 | Failed test-failure.t: output changed |
|
392 | 398 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
@@ -394,7 +400,7 b' No Diff' | |||
|
394 | 400 | [1] |
|
395 | 401 | |
|
396 | 402 | test --tmpdir support |
|
397 |
$ r |
|
|
403 | $ rt --tmpdir=$TESTTMP/keep test-success.t | |
|
398 | 404 | |
|
399 | 405 | Keeping testtmp dir: $TESTTMP/keep/child1/test-success.t (glob) |
|
400 | 406 | Keeping threadtmp dir: $TESTTMP/keep/child1 (glob) |
@@ -410,15 +416,14 b' timeouts' | |||
|
410 | 416 | > EOF |
|
411 | 417 | > echo '#require slow' > test-slow-timeout.t |
|
412 | 418 | > cat test-timeout.t >> test-slow-timeout.t |
|
413 | $ run-tests.py --with-hg=`which hg` --timeout=1 --slowtimeout=3 \ | |
|
414 | > test-timeout.t test-slow-timeout.t | |
|
419 | $ rt --timeout=1 --slowtimeout=3 test-timeout.t test-slow-timeout.t | |
|
415 | 420 | st |
|
416 | 421 | Skipped test-slow-timeout.t: skipped |
|
417 | 422 | Failed test-timeout.t: timed out |
|
418 | 423 | # Ran 1 tests, 1 skipped, 0 warned, 1 failed. |
|
419 | 424 | python hash seed: * (glob) |
|
420 | 425 | [1] |
|
421 |
$ r |
|
|
426 | $ rt --timeout=1 --slowtimeout=3 \ | |
|
422 | 427 | > test-timeout.t test-slow-timeout.t --allow-slow-tests |
|
423 | 428 | .t |
|
424 | 429 | Failed test-timeout.t: timed out |
@@ -430,7 +435,7 b' timeouts' | |||
|
430 | 435 | test for --time |
|
431 | 436 | ================== |
|
432 | 437 | |
|
433 |
$ r |
|
|
438 | $ rt test-success.t --time | |
|
434 | 439 | . |
|
435 | 440 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
|
436 | 441 | # Producing time report |
@@ -440,7 +445,7 b' test for --time' | |||
|
440 | 445 | test for --time with --job enabled |
|
441 | 446 | ==================================== |
|
442 | 447 | |
|
443 |
$ r |
|
|
448 | $ rt test-success.t --time --jobs 2 | |
|
444 | 449 | . |
|
445 | 450 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
|
446 | 451 | # Producing time report |
@@ -453,7 +458,7 b' Skips' | |||
|
453 | 458 | > $ echo xyzzy |
|
454 | 459 | > #require false |
|
455 | 460 | > EOF |
|
456 | $ run-tests.py --with-hg=`which hg` --nodiff | |
|
461 | $ rt --nodiff | |
|
457 | 462 | !.s |
|
458 | 463 | Skipped test-skip.t: skipped |
|
459 | 464 | Failed test-failure.t: output changed |
@@ -461,13 +466,13 b' Skips' | |||
|
461 | 466 | python hash seed: * (glob) |
|
462 | 467 | [1] |
|
463 | 468 | |
|
464 | $ run-tests.py --with-hg=`which hg` --keyword xyzzy | |
|
469 | $ rt --keyword xyzzy | |
|
465 | 470 | .s |
|
466 | 471 | Skipped test-skip.t: skipped |
|
467 | 472 | # Ran 2 tests, 2 skipped, 0 warned, 0 failed. |
|
468 | 473 | |
|
469 | 474 | Skips with xml |
|
470 |
$ r |
|
|
475 | $ rt --keyword xyzzy \ | |
|
471 | 476 | > --xunit=xunit.xml |
|
472 | 477 | .s |
|
473 | 478 | Skipped test-skip.t: skipped |
@@ -480,7 +485,7 b' Skips with xml' | |||
|
480 | 485 | |
|
481 | 486 | Missing skips or blacklisted skips don't count as executed: |
|
482 | 487 | $ echo test-failure.t > blacklist |
|
483 |
$ r |
|
|
488 | $ rt --blacklist=blacklist \ | |
|
484 | 489 | > test-failure.t test-bogus.t |
|
485 | 490 | ss |
|
486 | 491 | Skipped test-bogus.t: Doesn't exist |
@@ -492,7 +497,7 b" Missing skips or blacklisted skips don't" | |||
|
492 | 497 | test for --json |
|
493 | 498 | ================== |
|
494 | 499 | |
|
495 | $ run-tests.py --with-hg=`which hg` --json | |
|
500 | $ rt --json | |
|
496 | 501 | |
|
497 | 502 | --- $TESTTMP/test-failure.t |
|
498 | 503 | +++ $TESTTMP/test-failure.t.err |
@@ -542,7 +547,7 b' test for --json' | |||
|
542 | 547 | Test that failed test accepted through interactive are properly reported: |
|
543 | 548 | |
|
544 | 549 | $ cp test-failure.t backup |
|
545 |
$ echo y | r |
|
|
550 | $ echo y | rt --json -i | |
|
546 | 551 | |
|
547 | 552 | --- $TESTTMP/test-failure.t |
|
548 | 553 | +++ $TESTTMP/test-failure.t.err |
@@ -594,7 +599,7 b' backslash on end of line with glob match' | |||
|
594 | 599 | > foo * \ (glob) |
|
595 | 600 | > EOF |
|
596 | 601 | |
|
597 |
$ r |
|
|
602 | $ rt test-glob-backslash.t | |
|
598 | 603 | . |
|
599 | 604 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
|
600 | 605 | |
@@ -614,7 +619,7 b' Mercurial source tree.' | |||
|
614 | 619 | > $ echo foo |
|
615 | 620 | > foo |
|
616 | 621 | > EOF |
|
617 |
$ r |
|
|
622 | $ rt $HGTEST_RUN_TESTS_PURE test-hghave.t | |
|
618 | 623 | . |
|
619 | 624 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
|
620 | 625 | |
@@ -637,7 +642,7 b' running is placed.' | |||
|
637 | 642 | > # |
|
638 | 643 | > # check-code - a style and portability checker for Mercurial |
|
639 | 644 | > EOF |
|
640 |
$ r |
|
|
645 | $ rt $HGTEST_RUN_TESTS_PURE test-runtestdir.t | |
|
641 | 646 | . |
|
642 | 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 | 659 | > $ custom-command.sh |
|
655 | 660 | > hello world |
|
656 | 661 | > EOF |
|
657 |
$ r |
|
|
662 | $ rt $HGTEST_RUN_TESTS_PURE test-testdir-path.t | |
|
658 | 663 | . |
|
659 | 664 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
|
660 | 665 | |
@@ -666,10 +671,10 b' test support for --allow-slow-tests' | |||
|
666 | 671 | > $ echo pass |
|
667 | 672 | > pass |
|
668 | 673 | > EOF |
|
669 |
$ r |
|
|
674 | $ rt $HGTEST_RUN_TESTS_PURE test-very-slow-test.t | |
|
670 | 675 | s |
|
671 | 676 | Skipped test-very-slow-test.t: skipped |
|
672 | 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 | 680 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
General Comments 0
You need to be logged in to leave comments.
Login now