5 $ . "$TESTDIR/helper-runtests.sh" |
5 $ . "$TESTDIR/helper-runtests.sh" |
6 |
6 |
7 Smoke test with install |
7 Smoke test with install |
8 ============ |
8 ============ |
9 $ "$PYTHON" $TESTDIR/run-tests.py $HGTEST_RUN_TESTS_PURE -l |
9 $ "$PYTHON" $TESTDIR/run-tests.py $HGTEST_RUN_TESTS_PURE -l |
|
10 running 0 tests using 0 parallel processes |
10 |
11 |
11 # Ran 0 tests, 0 skipped, 0 failed. |
12 # Ran 0 tests, 0 skipped, 0 failed. |
12 |
13 |
13 Define a helper to avoid the install step |
14 Define a helper to avoid the install step |
14 ============= |
15 ============= |
21 |
22 |
22 #if symlink |
23 #if symlink |
23 $ ln -s `which true` hg |
24 $ ln -s `which true` hg |
24 $ "$PYTHON" $TESTDIR/run-tests.py --with-hg=./hg |
25 $ "$PYTHON" $TESTDIR/run-tests.py --with-hg=./hg |
25 warning: --with-hg should specify an hg script |
26 warning: --with-hg should specify an hg script |
|
27 running 0 tests using 0 parallel processes |
26 |
28 |
27 # Ran 0 tests, 0 skipped, 0 failed. |
29 # Ran 0 tests, 0 skipped, 0 failed. |
28 $ rm hg |
30 $ rm hg |
29 #endif |
31 #endif |
30 |
32 |
290 >>> fh = open('test-failure-unicode.t', 'wb') |
297 >>> fh = open('test-failure-unicode.t', 'wb') |
291 >>> fh.write(u' $ echo babar\u03b1\n'.encode('utf-8')) and None |
298 >>> fh.write(u' $ echo babar\u03b1\n'.encode('utf-8')) and None |
292 >>> fh.write(u' l\u03b5\u03b5t\n'.encode('utf-8')) and None |
299 >>> fh.write(u' l\u03b5\u03b5t\n'.encode('utf-8')) and None |
293 |
300 |
294 $ rt |
301 $ rt |
|
302 running 3 tests using 1 parallel processes |
295 |
303 |
296 --- $TESTTMP/test-failure.t |
304 --- $TESTTMP/test-failure.t |
297 +++ $TESTTMP/test-failure.t.err |
305 +++ $TESTTMP/test-failure.t.err |
298 @@ -1,5 +1,5 @@ |
306 @@ -1,5 +1,5 @@ |
299 $ echo babar |
307 $ echo babar |
502 --retest works with --outputdir |
513 --retest works with --outputdir |
503 $ rm -r output |
514 $ rm -r output |
504 $ mkdir output |
515 $ mkdir output |
505 $ mv test-failure.t.err output |
516 $ mv test-failure.t.err output |
506 $ rt --retest --outputdir output |
517 $ rt --retest --outputdir output |
|
518 running 2 tests using 1 parallel processes |
507 |
519 |
508 --- $TESTTMP/test-failure.t |
520 --- $TESTTMP/test-failure.t |
509 +++ $TESTTMP/output/test-failure.t.err |
521 +++ $TESTTMP/output/test-failure.t.err |
510 @@ -1,5 +1,5 @@ |
522 @@ -1,5 +1,5 @@ |
511 $ echo babar |
523 $ echo babar |
526 ====================== |
538 ====================== |
527 |
539 |
528 successful |
540 successful |
529 |
541 |
530 $ rt test-success.t |
542 $ rt test-success.t |
|
543 running 1 tests using 1 parallel processes |
531 . |
544 . |
532 # Ran 1 tests, 0 skipped, 0 failed. |
545 # Ran 1 tests, 0 skipped, 0 failed. |
533 |
546 |
534 success w/ keyword |
547 success w/ keyword |
535 $ rt -k xyzzy |
548 $ rt -k xyzzy |
|
549 running 2 tests using 1 parallel processes |
536 . |
550 . |
537 # Ran 2 tests, 1 skipped, 0 failed. |
551 # Ran 2 tests, 1 skipped, 0 failed. |
538 |
552 |
539 failed |
553 failed |
540 |
554 |
541 $ rt test-failure.t |
555 $ rt test-failure.t |
|
556 running 1 tests using 1 parallel processes |
542 |
557 |
543 --- $TESTTMP/test-failure.t |
558 --- $TESTTMP/test-failure.t |
544 +++ $TESTTMP/test-failure.t.err |
559 +++ $TESTTMP/test-failure.t.err |
545 @@ -1,5 +1,5 @@ |
560 @@ -1,5 +1,5 @@ |
546 $ echo babar |
561 $ echo babar |
582 |
598 |
583 $ cat > test-serve-fail.t <<EOF |
599 $ cat > test-serve-fail.t <<EOF |
584 > $ echo 'abort: child process failed to start blah' |
600 > $ echo 'abort: child process failed to start blah' |
585 > EOF |
601 > EOF |
586 $ rt test-serve-fail.t |
602 $ rt test-serve-fail.t |
|
603 running 1 tests using 1 parallel processes |
587 |
604 |
588 --- $TESTTMP/test-serve-fail.t |
605 --- $TESTTMP/test-serve-fail.t |
589 +++ $TESTTMP/test-serve-fail.t.err |
606 +++ $TESTTMP/test-serve-fail.t.err |
590 @@ -1* +1,2 @@ (glob) |
607 @@ -1* +1,2 @@ (glob) |
591 $ echo 'abort: child process failed to start blah' |
608 $ echo 'abort: child process failed to start blah' |
612 $ cat > test-serve-inuse.t <<EOF |
629 $ cat > test-serve-inuse.t <<EOF |
613 > $ hg serve -R `pwd`/inuse -p \$HGPORT -d --pid-file=hg.pid |
630 > $ hg serve -R `pwd`/inuse -p \$HGPORT -d --pid-file=hg.pid |
614 > $ cat hg.pid >> \$DAEMON_PIDS |
631 > $ cat hg.pid >> \$DAEMON_PIDS |
615 > EOF |
632 > EOF |
616 $ rt test-serve-inuse.t |
633 $ rt test-serve-inuse.t |
|
634 running 1 tests using 1 parallel processes |
617 . |
635 . |
618 # Ran 1 tests, 0 skipped, 0 failed. |
636 # Ran 1 tests, 0 skipped, 0 failed. |
619 $ rm test-serve-inuse.t |
637 $ rm test-serve-inuse.t |
620 $ killdaemons.py $DAEMON_PIDS |
638 $ killdaemons.py $DAEMON_PIDS |
621 |
639 |
622 Running In Debug Mode |
640 Running In Debug Mode |
623 ====================== |
641 ====================== |
624 |
642 |
625 $ rt --debug 2>&1 | grep -v pwd |
643 $ rt --debug 2>&1 | grep -v pwd |
|
644 running 2 tests using 1 parallel processes |
626 + echo *SALT* 0 0 (glob) |
645 + echo *SALT* 0 0 (glob) |
627 *SALT* 0 0 (glob) |
646 *SALT* 0 0 (glob) |
628 + echo babar |
647 + echo babar |
629 babar |
648 babar |
630 + echo *SALT* 10 0 (glob) |
649 + echo *SALT* 10 0 (glob) |
659 |
678 |
660 (duplicate the failing test to get predictable output) |
679 (duplicate the failing test to get predictable output) |
661 $ cp test-failure.t test-failure-copy.t |
680 $ cp test-failure.t test-failure-copy.t |
662 |
681 |
663 $ rt --jobs 2 test-failure*.t -n |
682 $ rt --jobs 2 test-failure*.t -n |
|
683 running 2 tests using 2 parallel processes |
664 !! |
684 !! |
665 Failed test-failure*.t: output changed (glob) |
685 Failed test-failure*.t: output changed (glob) |
666 Failed test-failure*.t: output changed (glob) |
686 Failed test-failure*.t: output changed (glob) |
667 # Ran 2 tests, 0 skipped, 2 failed. |
687 # Ran 2 tests, 0 skipped, 2 failed. |
668 python hash seed: * (glob) |
688 python hash seed: * (glob) |
669 [1] |
689 [1] |
670 |
690 |
671 failures in parallel with --first should only print one failure |
691 failures in parallel with --first should only print one failure |
672 $ rt --jobs 2 --first test-failure*.t |
692 $ rt --jobs 2 --first test-failure*.t |
|
693 running 2 tests using 2 parallel processes |
673 |
694 |
674 --- $TESTTMP/test-failure*.t (glob) |
695 --- $TESTTMP/test-failure*.t (glob) |
675 +++ $TESTTMP/test-failure*.t.err (glob) |
696 +++ $TESTTMP/test-failure*.t.err (glob) |
676 @@ -1,5 +1,5 @@ |
697 @@ -1,5 +1,5 @@ |
677 $ echo babar |
698 $ echo babar |
732 pad pad pad pad............................................................ |
754 pad pad pad pad............................................................ |
733 |
755 |
734 Interactive with custom view |
756 Interactive with custom view |
735 |
757 |
736 $ echo 'n' | rt -i --view echo |
758 $ echo 'n' | rt -i --view echo |
|
759 running 2 tests using 1 parallel processes |
737 $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err |
760 $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err |
738 Accept this change? [n]* (glob) |
761 Accept this change? [n]* (glob) |
739 ERROR: test-failure.t output changed |
762 ERROR: test-failure.t output changed |
740 !. |
763 !. |
741 Failed test-failure.t: output changed |
764 Failed test-failure.t: output changed |
764 > saved backup bundle to $TESTTMP\\foo.hg |
788 > saved backup bundle to $TESTTMP\\foo.hg |
765 > $ echo 'saved backup bundle to \$TESTTMP/foo.hg' |
789 > $ echo 'saved backup bundle to \$TESTTMP/foo.hg' |
766 > saved backup bundle to \$TESTTMP/*.hg (glob) |
790 > saved backup bundle to \$TESTTMP/*.hg (glob) |
767 > EOF |
791 > EOF |
768 $ echo 'y' | rt -i 2>&1 |
792 $ echo 'y' | rt -i 2>&1 |
|
793 running 2 tests using 1 parallel processes |
769 |
794 |
770 --- $TESTTMP/test-failure.t |
795 --- $TESTTMP/test-failure.t |
771 +++ $TESTTMP/test-failure.t.err |
796 +++ $TESTTMP/test-failure.t.err |
772 @@ -1,5 +1,5 @@ |
797 @@ -1,5 +1,5 @@ |
773 $ echo babar |
798 $ echo babar |
937 |
966 |
938 No Diff |
967 No Diff |
939 =============== |
968 =============== |
940 |
969 |
941 $ rt --nodiff |
970 $ rt --nodiff |
|
971 running 2 tests using 1 parallel processes |
942 !. |
972 !. |
943 Failed test-failure.t: output changed |
973 Failed test-failure.t: output changed |
944 # Ran 2 tests, 0 skipped, 1 failed. |
974 # Ran 2 tests, 0 skipped, 1 failed. |
945 python hash seed: * (glob) |
975 python hash seed: * (glob) |
946 [1] |
976 [1] |
947 |
977 |
948 test --tmpdir support |
978 test --tmpdir support |
949 $ rt --tmpdir=$TESTTMP/keep test-success.t |
979 $ rt --tmpdir=$TESTTMP/keep test-success.t |
|
980 running 1 tests using 1 parallel processes |
950 |
981 |
951 Keeping testtmp dir: $TESTTMP/keep/child1/test-success.t |
982 Keeping testtmp dir: $TESTTMP/keep/child1/test-success.t |
952 Keeping threadtmp dir: $TESTTMP/keep/child1 |
983 Keeping threadtmp dir: $TESTTMP/keep/child1 |
953 . |
984 . |
954 # Ran 1 tests, 0 skipped, 0 failed. |
985 # Ran 1 tests, 0 skipped, 0 failed. |
961 > pass |
992 > pass |
962 > EOF |
993 > EOF |
963 > echo '#require slow' > test-slow-timeout.t |
994 > echo '#require slow' > test-slow-timeout.t |
964 > cat test-timeout.t >> test-slow-timeout.t |
995 > cat test-timeout.t >> test-slow-timeout.t |
965 $ rt --timeout=1 --slowtimeout=3 test-timeout.t test-slow-timeout.t |
996 $ rt --timeout=1 --slowtimeout=3 test-timeout.t test-slow-timeout.t |
|
997 running 2 tests using 1 parallel processes |
966 st |
998 st |
967 Skipped test-slow-timeout.t: missing feature: allow slow tests (use --allow-slow-tests) |
999 Skipped test-slow-timeout.t: missing feature: allow slow tests (use --allow-slow-tests) |
968 Failed test-timeout.t: timed out |
1000 Failed test-timeout.t: timed out |
969 # Ran 1 tests, 1 skipped, 1 failed. |
1001 # Ran 1 tests, 1 skipped, 1 failed. |
970 python hash seed: * (glob) |
1002 python hash seed: * (glob) |
971 [1] |
1003 [1] |
972 $ rt --timeout=1 --slowtimeout=3 \ |
1004 $ rt --timeout=1 --slowtimeout=3 \ |
973 > test-timeout.t test-slow-timeout.t --allow-slow-tests |
1005 > test-timeout.t test-slow-timeout.t --allow-slow-tests |
|
1006 running 2 tests using 1 parallel processes |
974 .t |
1007 .t |
975 Failed test-timeout.t: timed out |
1008 Failed test-timeout.t: timed out |
976 # Ran 2 tests, 0 skipped, 1 failed. |
1009 # Ran 2 tests, 0 skipped, 1 failed. |
977 python hash seed: * (glob) |
1010 python hash seed: * (glob) |
978 [1] |
1011 [1] |
980 |
1013 |
981 test for --time |
1014 test for --time |
982 ================== |
1015 ================== |
983 |
1016 |
984 $ rt test-success.t --time |
1017 $ rt test-success.t --time |
|
1018 running 1 tests using 1 parallel processes |
985 . |
1019 . |
986 # Ran 1 tests, 0 skipped, 0 failed. |
1020 # Ran 1 tests, 0 skipped, 0 failed. |
987 # Producing time report |
1021 # Producing time report |
988 start end cuser csys real Test |
1022 start end cuser csys real Test |
989 \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) |
1023 \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) |
990 |
1024 |
991 test for --time with --job enabled |
1025 test for --time with --job enabled |
992 ==================================== |
1026 ==================================== |
993 |
1027 |
994 $ rt test-success.t --time --jobs 2 |
1028 $ rt test-success.t --time --jobs 2 |
|
1029 running 1 tests using 1 parallel processes |
995 . |
1030 . |
996 # Ran 1 tests, 0 skipped, 0 failed. |
1031 # Ran 1 tests, 0 skipped, 0 failed. |
997 # Producing time report |
1032 # Producing time report |
998 start end cuser csys real Test |
1033 start end cuser csys real Test |
999 \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) |
1034 \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) |
1010 > #if false |
1045 > #if false |
1011 > #require false |
1046 > #require false |
1012 > #endif |
1047 > #endif |
1013 > EOF |
1048 > EOF |
1014 $ rt --nodiff |
1049 $ rt --nodiff |
|
1050 running 4 tests using 1 parallel processes |
1015 !.s. |
1051 !.s. |
1016 Skipped test-skip.t: missing feature: nail clipper |
1052 Skipped test-skip.t: missing feature: nail clipper |
1017 Failed test-failure.t: output changed |
1053 Failed test-failure.t: output changed |
1018 # Ran 3 tests, 1 skipped, 1 failed. |
1054 # Ran 3 tests, 1 skipped, 1 failed. |
1019 python hash seed: * (glob) |
1055 python hash seed: * (glob) |
1020 [1] |
1056 [1] |
1021 |
1057 |
1022 $ rm test-noskip.t |
1058 $ rm test-noskip.t |
1023 $ rt --keyword xyzzy |
1059 $ rt --keyword xyzzy |
|
1060 running 3 tests using 1 parallel processes |
1024 .s |
1061 .s |
1025 Skipped test-skip.t: missing feature: nail clipper |
1062 Skipped test-skip.t: missing feature: nail clipper |
1026 # Ran 2 tests, 2 skipped, 0 failed. |
1063 # Ran 2 tests, 2 skipped, 0 failed. |
1027 |
1064 |
1028 Skips with xml |
1065 Skips with xml |
1029 $ rt --keyword xyzzy \ |
1066 $ rt --keyword xyzzy \ |
1030 > --xunit=xunit.xml |
1067 > --xunit=xunit.xml |
|
1068 running 3 tests using 1 parallel processes |
1031 .s |
1069 .s |
1032 Skipped test-skip.t: missing feature: nail clipper |
1070 Skipped test-skip.t: missing feature: nail clipper |
1033 # Ran 2 tests, 2 skipped, 0 failed. |
1071 # Ran 2 tests, 2 skipped, 0 failed. |
1034 $ cat xunit.xml |
1072 $ cat xunit.xml |
1035 <?xml version="1.0" encoding="utf-8"?> |
1073 <?xml version="1.0" encoding="utf-8"?> |
1043 |
1081 |
1044 Missing skips or blacklisted skips don't count as executed: |
1082 Missing skips or blacklisted skips don't count as executed: |
1045 $ echo test-failure.t > blacklist |
1083 $ echo test-failure.t > blacklist |
1046 $ rt --blacklist=blacklist --json\ |
1084 $ rt --blacklist=blacklist --json\ |
1047 > test-failure.t test-bogus.t |
1085 > test-failure.t test-bogus.t |
|
1086 running 2 tests using 1 parallel processes |
1048 ss |
1087 ss |
1049 Skipped test-bogus.t: Doesn't exist |
1088 Skipped test-bogus.t: Doesn't exist |
1050 Skipped test-failure.t: blacklisted |
1089 Skipped test-failure.t: blacklisted |
1051 # Ran 0 tests, 2 skipped, 0 failed. |
1090 # Ran 0 tests, 2 skipped, 0 failed. |
1052 $ cat report.json |
1091 $ cat report.json |
1061 |
1100 |
1062 Whitelist trumps blacklist |
1101 Whitelist trumps blacklist |
1063 $ echo test-failure.t > whitelist |
1102 $ echo test-failure.t > whitelist |
1064 $ rt --blacklist=blacklist --whitelist=whitelist --json\ |
1103 $ rt --blacklist=blacklist --whitelist=whitelist --json\ |
1065 > test-failure.t test-bogus.t |
1104 > test-failure.t test-bogus.t |
|
1105 running 2 tests using 1 parallel processes |
1066 s |
1106 s |
1067 --- $TESTTMP/test-failure.t |
1107 --- $TESTTMP/test-failure.t |
1068 +++ $TESTTMP/test-failure.t.err |
1108 +++ $TESTTMP/test-failure.t.err |
1069 @@ -1,5 +1,5 @@ |
1109 @@ -1,5 +1,5 @@ |
1070 $ echo babar |
1110 $ echo babar |
1084 |
1124 |
1085 Ensure that --test-list causes only the tests listed in that file to |
1125 Ensure that --test-list causes only the tests listed in that file to |
1086 be executed. |
1126 be executed. |
1087 $ echo test-success.t >> onlytest |
1127 $ echo test-success.t >> onlytest |
1088 $ rt --test-list=onlytest |
1128 $ rt --test-list=onlytest |
|
1129 running 1 tests using 1 parallel processes |
1089 . |
1130 . |
1090 # Ran 1 tests, 0 skipped, 0 failed. |
1131 # Ran 1 tests, 0 skipped, 0 failed. |
1091 $ echo test-bogus.t >> anothertest |
1132 $ echo test-bogus.t >> anothertest |
1092 $ rt --test-list=onlytest --test-list=anothertest |
1133 $ rt --test-list=onlytest --test-list=anothertest |
|
1134 running 2 tests using 1 parallel processes |
1093 s. |
1135 s. |
1094 Skipped test-bogus.t: Doesn't exist |
1136 Skipped test-bogus.t: Doesn't exist |
1095 # Ran 1 tests, 1 skipped, 0 failed. |
1137 # Ran 1 tests, 1 skipped, 0 failed. |
1096 $ rm onlytest anothertest |
1138 $ rm onlytest anothertest |
1097 |
1139 |
1098 test for --json |
1140 test for --json |
1099 ================== |
1141 ================== |
1100 |
1142 |
1101 $ rt --json |
1143 $ rt --json |
|
1144 running 3 tests using 1 parallel processes |
1102 |
1145 |
1103 --- $TESTTMP/test-failure.t |
1146 --- $TESTTMP/test-failure.t |
1104 +++ $TESTTMP/test-failure.t.err |
1147 +++ $TESTTMP/test-failure.t.err |
1105 @@ -1,5 +1,5 @@ |
1148 @@ -1,5 +1,5 @@ |
1106 $ echo babar |
1149 $ echo babar |
1213 |
1257 |
1214 Test that failed test accepted through interactive are properly reported: |
1258 Test that failed test accepted through interactive are properly reported: |
1215 |
1259 |
1216 $ cp test-failure.t backup |
1260 $ cp test-failure.t backup |
1217 $ echo y | rt --json -i |
1261 $ echo y | rt --json -i |
|
1262 running 3 tests using 1 parallel processes |
1218 |
1263 |
1219 --- $TESTTMP/test-failure.t |
1264 --- $TESTTMP/test-failure.t |
1220 +++ $TESTTMP/test-failure.t.err |
1265 +++ $TESTTMP/test-failure.t.err |
1221 @@ -1,5 +1,5 @@ |
1266 @@ -1,5 +1,5 @@ |
1222 $ echo babar |
1267 $ echo babar |
1267 > $ echo 'foo bar \\' |
1312 > $ echo 'foo bar \\' |
1268 > foo * \ (glob) |
1313 > foo * \ (glob) |
1269 > EOF |
1314 > EOF |
1270 |
1315 |
1271 $ rt test-glob-backslash.t |
1316 $ rt test-glob-backslash.t |
|
1317 running 1 tests using 1 parallel processes |
1272 . |
1318 . |
1273 # Ran 1 tests, 0 skipped, 0 failed. |
1319 # Ran 1 tests, 0 skipped, 0 failed. |
1274 |
1320 |
1275 $ rm -f test-glob-backslash.t |
1321 $ rm -f test-glob-backslash.t |
1276 |
1322 |
1282 |
1328 |
1283 Add support for external test formatter |
1329 Add support for external test formatter |
1284 ======================================= |
1330 ======================================= |
1285 |
1331 |
1286 $ CUSTOM_TEST_RESULT=basic_test_result "$PYTHON" $TESTDIR/run-tests.py --with-hg=`which hg` "$@" test-success.t test-failure.t |
1332 $ CUSTOM_TEST_RESULT=basic_test_result "$PYTHON" $TESTDIR/run-tests.py --with-hg=`which hg` "$@" test-success.t test-failure.t |
|
1333 running 2 tests using 1 parallel processes |
1287 |
1334 |
1288 # Ran 2 tests, 0 skipped, 0 failed. |
1335 # Ran 2 tests, 0 skipped, 0 failed. |
1289 ON_START! <__main__.TestSuite tests=[<__main__.TTest testMethod=test-failure.t>, <__main__.TTest testMethod=test-success.t>]> |
1336 ON_START! <__main__.TestSuite tests=[<__main__.TTest testMethod=test-failure.t>, <__main__.TTest testMethod=test-success.t>]> |
1290 FAILURE! test-failure.t output changed |
1337 FAILURE! test-failure.t output changed |
1291 SUCCESS! test-success.t |
1338 SUCCESS! test-success.t |
1349 $ cat > test-testdir-path.t <<EOF |
1398 $ cat > test-testdir-path.t <<EOF |
1350 > $ custom-command.sh |
1399 > $ custom-command.sh |
1351 > hello world |
1400 > hello world |
1352 > EOF |
1401 > EOF |
1353 $ rt test-testdir-path.t |
1402 $ rt test-testdir-path.t |
|
1403 running 1 tests using 1 parallel processes |
1354 . |
1404 . |
1355 # Ran 1 tests, 0 skipped, 0 failed. |
1405 # Ran 1 tests, 0 skipped, 0 failed. |
1356 |
1406 |
1357 #endif |
1407 #endif |
1358 |
1408 |
1361 > #require slow |
1411 > #require slow |
1362 > $ echo pass |
1412 > $ echo pass |
1363 > pass |
1413 > pass |
1364 > EOF |
1414 > EOF |
1365 $ rt test-very-slow-test.t |
1415 $ rt test-very-slow-test.t |
|
1416 running 1 tests using 1 parallel processes |
1366 s |
1417 s |
1367 Skipped test-very-slow-test.t: missing feature: allow slow tests (use --allow-slow-tests) |
1418 Skipped test-very-slow-test.t: missing feature: allow slow tests (use --allow-slow-tests) |
1368 # Ran 0 tests, 1 skipped, 0 failed. |
1419 # Ran 0 tests, 1 skipped, 0 failed. |
1369 $ rt $HGTEST_RUN_TESTS_PURE --allow-slow-tests test-very-slow-test.t |
1420 $ rt $HGTEST_RUN_TESTS_PURE --allow-slow-tests test-very-slow-test.t |
|
1421 running 1 tests using 1 parallel processes |
1370 . |
1422 . |
1371 # Ran 1 tests, 0 skipped, 0 failed. |
1423 # Ran 1 tests, 0 skipped, 0 failed. |
1372 |
1424 |
1373 support for running a test outside the current directory |
1425 support for running a test outside the current directory |
1374 $ mkdir nonlocal |
1426 $ mkdir nonlocal |
1375 $ cat > nonlocal/test-is-not-here.t << EOF |
1427 $ cat > nonlocal/test-is-not-here.t << EOF |
1376 > $ echo pass |
1428 > $ echo pass |
1377 > pass |
1429 > pass |
1378 > EOF |
1430 > EOF |
1379 $ rt nonlocal/test-is-not-here.t |
1431 $ rt nonlocal/test-is-not-here.t |
|
1432 running 1 tests using 1 parallel processes |
1380 . |
1433 . |
1381 # Ran 1 tests, 0 skipped, 0 failed. |
1434 # Ran 1 tests, 0 skipped, 0 failed. |
1382 |
1435 |
1383 support for automatically discovering test if arg is a folder |
1436 support for automatically discovering test if arg is a folder |
1384 $ mkdir tmp && cd tmp |
1437 $ mkdir tmp && cd tmp |
1392 $ cd .. |
1445 $ cd .. |
1393 $ cp -R tmp tmpp |
1446 $ cp -R tmp tmpp |
1394 $ cp tmp/test-uno.t test-solo.t |
1447 $ cp tmp/test-uno.t test-solo.t |
1395 |
1448 |
1396 $ rt tmp/ test-solo.t tmpp |
1449 $ rt tmp/ test-solo.t tmpp |
|
1450 running 5 tests using 1 parallel processes |
1397 ..... |
1451 ..... |
1398 # Ran 5 tests, 0 skipped, 0 failed. |
1452 # Ran 5 tests, 0 skipped, 0 failed. |
1399 $ rm -rf tmp tmpp |
1453 $ rm -rf tmp tmpp |
1400 |
1454 |
1401 support for running run-tests.py from another directory |
1455 support for running run-tests.py from another directory |
1476 > pass |
1532 > pass |
1477 > EOF |
1533 > EOF |
1478 $ hg commit -Am dependent test-bisect-dependent.t |
1534 $ hg commit -Am dependent test-bisect-dependent.t |
1479 |
1535 |
1480 $ rt --known-good-rev=0 test-bisect-dependent.t |
1536 $ rt --known-good-rev=0 test-bisect-dependent.t |
|
1537 running 1 tests using 1 parallel processes |
1481 |
1538 |
1482 --- $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t |
1539 --- $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t |
1483 +++ $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t.err |
1540 +++ $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t.err |
1484 @@ -1,2 +1,2 @@ |
1541 @@ -1,2 +1,2 @@ |
1485 $ tail -1 $TESTDIR/../bisect/test-bisect.t |
1542 $ tail -1 $TESTDIR/../bisect/test-bisect.t |
1498 usage: run-tests.py [options] [tests] |
1555 usage: run-tests.py [options] [tests] |
1499 run-tests.py: error: --bisect-repo cannot be used without --known-good-rev |
1556 run-tests.py: error: --bisect-repo cannot be used without --known-good-rev |
1500 [2] |
1557 [2] |
1501 |
1558 |
1502 $ rt --known-good-rev=0 --bisect-repo=../bisect test-bisect-dependent.t |
1559 $ rt --known-good-rev=0 --bisect-repo=../bisect test-bisect-dependent.t |
|
1560 running 1 tests using 1 parallel processes |
1503 |
1561 |
1504 --- $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t |
1562 --- $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t |
1505 +++ $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t.err |
1563 +++ $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t.err |
1506 @@ -1,2 +1,2 @@ |
1564 @@ -1,2 +1,2 @@ |
1507 $ tail -1 $TESTDIR/../bisect/test-bisect.t |
1565 $ tail -1 $TESTDIR/../bisect/test-bisect.t |
1618 --restart works with outputdir |
1679 --restart works with outputdir |
1619 |
1680 |
1620 $ mkdir output |
1681 $ mkdir output |
1621 $ mv test-cases-abc.t#B.err output |
1682 $ mv test-cases-abc.t#B.err output |
1622 $ rt --restart --outputdir output |
1683 $ rt --restart --outputdir output |
|
1684 running 2 tests using 1 parallel processes |
1623 |
1685 |
1624 --- $TESTTMP/anothertests/cases/test-cases-abc.t |
1686 --- $TESTTMP/anothertests/cases/test-cases-abc.t |
1625 +++ $TESTTMP/anothertests/cases/output/test-cases-abc.t#B.err |
1687 +++ $TESTTMP/anothertests/cases/output/test-cases-abc.t#B.err |
1626 @@ -7,7 +7,7 @@ |
1688 @@ -7,7 +7,7 @@ |
1627 $ V=C |
1689 $ V=C |
1655 > $ dostuff |
1717 > $ dostuff |
1656 > In case B |
1718 > In case B |
1657 > #endif |
1719 > #endif |
1658 > EOF |
1720 > EOF |
1659 $ rt test-cases-ab.t |
1721 $ rt test-cases-ab.t |
|
1722 running 2 tests using 1 parallel processes |
1660 .. |
1723 .. |
1661 # Ran 2 tests, 0 skipped, 0 failed. |
1724 # Ran 2 tests, 0 skipped, 0 failed. |
1662 |
1725 |
1663 Support running a specific test case |
1726 Support running a specific test case |
1664 |
1727 |
1665 $ rt "test-cases-abc.t#B" |
1728 $ rt "test-cases-abc.t#B" |
|
1729 running 1 tests using 1 parallel processes |
1666 |
1730 |
1667 --- $TESTTMP/anothertests/cases/test-cases-abc.t |
1731 --- $TESTTMP/anothertests/cases/test-cases-abc.t |
1668 +++ $TESTTMP/anothertests/cases/test-cases-abc.t#B.err |
1732 +++ $TESTTMP/anothertests/cases/test-cases-abc.t#B.err |
1669 @@ -7,7 +7,7 @@ |
1733 @@ -7,7 +7,7 @@ |
1670 $ V=C |
1734 $ V=C |
1741 #testcases simple case-with-dashes casewith_-.chars |
1807 #testcases simple case-with-dashes casewith_-.chars |
1742 $ echo $TESTCASE |
1808 $ echo $TESTCASE |
1743 simple |
1809 simple |
1744 |
1810 |
1745 $ rt test-cases-advanced-cases.t |
1811 $ rt test-cases-advanced-cases.t |
|
1812 running 3 tests using 1 parallel processes |
1746 |
1813 |
1747 --- $TESTTMP/anothertests/cases/test-cases-advanced-cases.t |
1814 --- $TESTTMP/anothertests/cases/test-cases-advanced-cases.t |
1748 +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t#case-with-dashes.err |
1815 +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t#case-with-dashes.err |
1749 @@ -1,3 +1,3 @@ |
1816 @@ -1,3 +1,3 @@ |
1750 #testcases simple case-with-dashes casewith_-.chars |
1817 #testcases simple case-with-dashes casewith_-.chars |
1769 # Ran 3 tests, 0 skipped, 2 failed. |
1836 # Ran 3 tests, 0 skipped, 2 failed. |
1770 python hash seed: * (glob) |
1837 python hash seed: * (glob) |
1771 [1] |
1838 [1] |
1772 |
1839 |
1773 $ rt "test-cases-advanced-cases.t#case-with-dashes" |
1840 $ rt "test-cases-advanced-cases.t#case-with-dashes" |
|
1841 running 1 tests using 1 parallel processes |
1774 |
1842 |
1775 --- $TESTTMP/anothertests/cases/test-cases-advanced-cases.t |
1843 --- $TESTTMP/anothertests/cases/test-cases-advanced-cases.t |
1776 +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t#case-with-dashes.err |
1844 +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t#case-with-dashes.err |
1777 @@ -1,3 +1,3 @@ |
1845 @@ -1,3 +1,3 @@ |
1778 #testcases simple case-with-dashes casewith_-.chars |
1846 #testcases simple case-with-dashes casewith_-.chars |
1786 # Ran 1 tests, 0 skipped, 1 failed. |
1854 # Ran 1 tests, 0 skipped, 1 failed. |
1787 python hash seed: * (glob) |
1855 python hash seed: * (glob) |
1788 [1] |
1856 [1] |
1789 |
1857 |
1790 $ rt "test-cases-advanced-cases.t#casewith_-.chars" |
1858 $ rt "test-cases-advanced-cases.t#casewith_-.chars" |
|
1859 running 1 tests using 1 parallel processes |
1791 |
1860 |
1792 --- $TESTTMP/anothertests/cases/test-cases-advanced-cases.t |
1861 --- $TESTTMP/anothertests/cases/test-cases-advanced-cases.t |
1793 +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t#casewith_-.chars.err |
1862 +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t#casewith_-.chars.err |
1794 @@ -1,3 +1,3 @@ |
1863 @@ -1,3 +1,3 @@ |
1795 #testcases simple case-with-dashes casewith_-.chars |
1864 #testcases simple case-with-dashes casewith_-.chars |
1851 > $ hg init test-config-opt |
1921 > $ hg init test-config-opt |
1852 > $ hg -R test-config-opt purge |
1922 > $ hg -R test-config-opt purge |
1853 > EOF |
1923 > EOF |
1854 |
1924 |
1855 $ rt --extra-config-opt extensions.purge= test-config-opt.t |
1925 $ rt --extra-config-opt extensions.purge= test-config-opt.t |
|
1926 running 1 tests using 1 parallel processes |
1856 . |
1927 . |
1857 # Ran 1 tests, 0 skipped, 0 failed. |
1928 # Ran 1 tests, 0 skipped, 0 failed. |