Show More
@@ -639,6 +639,8 b' def runone(options, test, skips, fails):' | |||
|
639 | 639 | True -> passed |
|
640 | 640 | False -> failed''' |
|
641 | 641 | |
|
642 | testpath = os.path.join(TESTDIR, test) | |
|
643 | ||
|
642 | 644 | def skip(msg): |
|
643 | 645 | if not options.verbose: |
|
644 | 646 | skips.append((test, msg)) |
@@ -660,6 +662,15 b' def runone(options, test, skips, fails):' | |||
|
660 | 662 | return |
|
661 | 663 | fails.append((test, msg)) |
|
662 | 664 | |
|
665 | if (test.startswith("test-") and '~' not in test and | |
|
666 | ('.' not in test or test.endswith('.py') or | |
|
667 | test.endswith('.bat') or test.endswith('.t'))): | |
|
668 | if not os.path.exists(test): | |
|
669 | skip("doesn't exist") | |
|
670 | return None | |
|
671 | else: | |
|
672 | return None # not a supported test, don't record | |
|
673 | ||
|
663 | 674 | vlog("# Test", test) |
|
664 | 675 | |
|
665 | 676 | # create a fresh hgrc |
@@ -678,7 +689,6 b' def runone(options, test, skips, fails):' | |||
|
678 | 689 | hgrc.write('appendpid=True\n') |
|
679 | 690 | hgrc.close() |
|
680 | 691 | |
|
681 | testpath = os.path.join(TESTDIR, test) | |
|
682 | 692 | ref = os.path.join(TESTDIR, test+".out") |
|
683 | 693 | err = os.path.join(TESTDIR, test+".err") |
|
684 | 694 | if os.path.exists(err): |
@@ -944,7 +954,10 b' def runtests(options, tests):' | |||
|
944 | 954 | continue |
|
945 | 955 | |
|
946 | 956 | if options.keywords: |
|
957 | try: | |
|
947 | 958 | fp = open(test) |
|
959 | except IOError: | |
|
960 | continue | |
|
948 | 961 | t = fp.read().lower() + test.lower() |
|
949 | 962 | fp.close() |
|
950 | 963 | for k in options.keywords.lower().split(): |
@@ -1001,22 +1014,7 b' def main():' | |||
|
1001 | 1014 | args = os.listdir(".") |
|
1002 | 1015 | args.sort() |
|
1003 | 1016 | |
|
1004 |
tests = |
|
|
1005 | skipped = [] | |
|
1006 | for test in args: | |
|
1007 | if (test.startswith("test-") and '~' not in test and | |
|
1008 | ('.' not in test or test.endswith('.py') or | |
|
1009 | test.endswith('.bat') or test.endswith('.t'))): | |
|
1010 | if not os.path.exists(test): | |
|
1011 | skipped.append(test) | |
|
1012 | else: | |
|
1013 | tests.append(test) | |
|
1014 | if not tests: | |
|
1015 | for test in skipped: | |
|
1016 | print 'Skipped %s: does not exist' % test | |
|
1017 | print "# Ran 0 tests, %d skipped, 0 failed." % len(skipped) | |
|
1018 | return | |
|
1019 | tests = tests + skipped | |
|
1017 | tests = args | |
|
1020 | 1018 | |
|
1021 | 1019 | # Reset some environment variables to well-known values so that |
|
1022 | 1020 | # the tests produce repeatable output. |
General Comments 0
You need to be logged in to leave comments.
Login now