Show More
@@ -496,45 +496,6 b' def run_one(test, skips, fails):' | |||||
496 | return None |
|
496 | return None | |
497 | return ret == 0 |
|
497 | return ret == 0 | |
498 |
|
498 | |||
499 | (options, args) = parse_args() |
|
|||
500 | if not options.child: |
|
|||
501 | os.umask(022) |
|
|||
502 |
|
||||
503 | check_required_tools() |
|
|||
504 |
|
||||
505 | # Reset some environment variables to well-known values so that |
|
|||
506 | # the tests produce repeatable output. |
|
|||
507 | os.environ['LANG'] = os.environ['LC_ALL'] = 'C' |
|
|||
508 | os.environ['TZ'] = 'GMT' |
|
|||
509 | os.environ["EMAIL"] = "Foo Bar <foo.bar@example.com>" |
|
|||
510 | os.environ['CDPATH'] = '' |
|
|||
511 |
|
||||
512 | TESTDIR = os.environ["TESTDIR"] = os.getcwd() |
|
|||
513 | HGTMP = os.environ['HGTMP'] = os.path.realpath(tempfile.mkdtemp('', 'hgtests.', |
|
|||
514 | options.tmpdir)) |
|
|||
515 | DAEMON_PIDS = None |
|
|||
516 | HGRCPATH = None |
|
|||
517 |
|
||||
518 | os.environ["HGEDITOR"] = sys.executable + ' -c "import sys; sys.exit(0)"' |
|
|||
519 | os.environ["HGMERGE"] = "internal:merge" |
|
|||
520 | os.environ["HGUSER"] = "test" |
|
|||
521 | os.environ["HGENCODING"] = "ascii" |
|
|||
522 | os.environ["HGENCODINGMODE"] = "strict" |
|
|||
523 | os.environ["HGPORT"] = str(options.port) |
|
|||
524 | os.environ["HGPORT1"] = str(options.port + 1) |
|
|||
525 | os.environ["HGPORT2"] = str(options.port + 2) |
|
|||
526 |
|
||||
527 | if options.with_hg: |
|
|||
528 | INST = options.with_hg |
|
|||
529 | else: |
|
|||
530 | INST = os.path.join(HGTMP, "install") |
|
|||
531 | BINDIR = os.environ["BINDIR"] = os.path.join(INST, "bin") |
|
|||
532 | PYTHONDIR = os.path.join(INST, "lib", "python") |
|
|||
533 | COVERAGE_FILE = os.path.join(TESTDIR, ".coverage") |
|
|||
534 |
|
||||
535 | expecthg = os.path.join(HGTMP, 'install', 'lib', 'python', 'mercurial') |
|
|||
536 | hgpkg = None |
|
|||
537 |
|
||||
538 | def run_children(tests): |
|
499 | def run_children(tests): | |
539 | if not options.with_hg: |
|
500 | if not options.with_hg: | |
540 | install_hg() |
|
501 | install_hg() | |
@@ -686,6 +647,45 b' def run_tests(tests):' | |||||
686 | if failed: |
|
647 | if failed: | |
687 | sys.exit(1) |
|
648 | sys.exit(1) | |
688 |
|
649 | |||
|
650 | (options, args) = parse_args() | |||
|
651 | if not options.child: | |||
|
652 | os.umask(022) | |||
|
653 | ||||
|
654 | check_required_tools() | |||
|
655 | ||||
|
656 | # Reset some environment variables to well-known values so that | |||
|
657 | # the tests produce repeatable output. | |||
|
658 | os.environ['LANG'] = os.environ['LC_ALL'] = 'C' | |||
|
659 | os.environ['TZ'] = 'GMT' | |||
|
660 | os.environ["EMAIL"] = "Foo Bar <foo.bar@example.com>" | |||
|
661 | os.environ['CDPATH'] = '' | |||
|
662 | ||||
|
663 | TESTDIR = os.environ["TESTDIR"] = os.getcwd() | |||
|
664 | HGTMP = os.environ['HGTMP'] = os.path.realpath(tempfile.mkdtemp('', 'hgtests.', | |||
|
665 | options.tmpdir)) | |||
|
666 | DAEMON_PIDS = None | |||
|
667 | HGRCPATH = None | |||
|
668 | ||||
|
669 | os.environ["HGEDITOR"] = sys.executable + ' -c "import sys; sys.exit(0)"' | |||
|
670 | os.environ["HGMERGE"] = "internal:merge" | |||
|
671 | os.environ["HGUSER"] = "test" | |||
|
672 | os.environ["HGENCODING"] = "ascii" | |||
|
673 | os.environ["HGENCODINGMODE"] = "strict" | |||
|
674 | os.environ["HGPORT"] = str(options.port) | |||
|
675 | os.environ["HGPORT1"] = str(options.port + 1) | |||
|
676 | os.environ["HGPORT2"] = str(options.port + 2) | |||
|
677 | ||||
|
678 | if options.with_hg: | |||
|
679 | INST = options.with_hg | |||
|
680 | else: | |||
|
681 | INST = os.path.join(HGTMP, "install") | |||
|
682 | BINDIR = os.environ["BINDIR"] = os.path.join(INST, "bin") | |||
|
683 | PYTHONDIR = os.path.join(INST, "lib", "python") | |||
|
684 | COVERAGE_FILE = os.path.join(TESTDIR, ".coverage") | |||
|
685 | ||||
|
686 | expecthg = os.path.join(HGTMP, 'install', 'lib', 'python', 'mercurial') | |||
|
687 | hgpkg = None | |||
|
688 | ||||
689 | if len(args) == 0: |
|
689 | if len(args) == 0: | |
690 | args = os.listdir(".") |
|
690 | args = os.listdir(".") | |
691 | args.sort() |
|
691 | args.sort() |
General Comments 0
You need to be logged in to leave comments.
Login now