Mercurial > hg
comparison tests/run-tests.py @ 9939:251812d34c08 stable
Merge stable heads
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 25 Nov 2009 21:54:18 -0600 |
parents | a0680daed7b2 e3237af51def |
children | 2d0f1cde217b d4a62b6d4a58 |
comparison
equal
deleted
inserted
replaced
9931:a0680daed7b2 | 9939:251812d34c08 |
---|---|
29 # ./run-tests.py -j2 test-s* | 29 # ./run-tests.py -j2 test-s* |
30 # 6) parallel, no coverage, local hg: | 30 # 6) parallel, no coverage, local hg: |
31 # ./run-tests.py -j2 --local test-s* | 31 # ./run-tests.py -j2 --local test-s* |
32 # 7) parallel, coverage, temp install: | 32 # 7) parallel, coverage, temp install: |
33 # ./run-tests.py -j2 -c test-s* # currently broken | 33 # ./run-tests.py -j2 -c test-s* # currently broken |
34 # 8) parallel, coverage, local install | 34 # 8) parallel, coverage, local install: |
35 # ./run-tests.py -j2 -c --local test-s* # unsupported (and broken) | 35 # ./run-tests.py -j2 -c --local test-s* # unsupported (and broken) |
36 # 9) parallel, custom tmp dir: | |
37 # ./run-tests.py -j2 --tmpdir /tmp/myhgtests | |
36 # | 38 # |
37 # (You could use any subset of the tests: test-s* happens to match | 39 # (You could use any subset of the tests: test-s* happens to match |
38 # enough that it's worth doing parallel runs, few enough that it | 40 # enough that it's worth doing parallel runs, few enough that it |
39 # completes fairly quickly, includes both shell and Python scripts, and | 41 # completes fairly quickly, includes both shell and Python scripts, and |
40 # includes some scripts that run daemon processes.) | 42 # includes some scripts that run daemon processes.) |
637 for j, job in enumerate(jobs): | 639 for j, job in enumerate(jobs): |
638 if not job: | 640 if not job: |
639 continue | 641 continue |
640 rfd, wfd = os.pipe() | 642 rfd, wfd = os.pipe() |
641 childopts = ['--child=%d' % wfd, '--port=%d' % (options.port + j * 3)] | 643 childopts = ['--child=%d' % wfd, '--port=%d' % (options.port + j * 3)] |
644 childtmp = os.path.join(HGTMP, 'child%d' % j) | |
645 childopts += ['--tmpdir', childtmp] | |
642 cmdline = [PYTHON, sys.argv[0]] + opts + childopts + job | 646 cmdline = [PYTHON, sys.argv[0]] + opts + childopts + job |
643 vlog(' '.join(cmdline)) | 647 vlog(' '.join(cmdline)) |
644 fps[os.spawnvp(os.P_NOWAIT, cmdline[0], cmdline)] = os.fdopen(rfd, 'r') | 648 fps[os.spawnvp(os.P_NOWAIT, cmdline[0], cmdline)] = os.fdopen(rfd, 'r') |
645 os.close(wfd) | 649 os.close(wfd) |
646 failures = 0 | 650 failures = 0 |
779 # the tests produce repeatable output. | 783 # the tests produce repeatable output. |
780 os.environ['LANG'] = os.environ['LC_ALL'] = os.environ['LANGUAGE'] = 'C' | 784 os.environ['LANG'] = os.environ['LC_ALL'] = os.environ['LANGUAGE'] = 'C' |
781 os.environ['TZ'] = 'GMT' | 785 os.environ['TZ'] = 'GMT' |
782 os.environ["EMAIL"] = "Foo Bar <foo.bar@example.com>" | 786 os.environ["EMAIL"] = "Foo Bar <foo.bar@example.com>" |
783 os.environ['CDPATH'] = '' | 787 os.environ['CDPATH'] = '' |
788 os.environ['COLUMNS'] = '80' | |
784 | 789 |
785 global TESTDIR, HGTMP, INST, BINDIR, PYTHONDIR, COVERAGE_FILE | 790 global TESTDIR, HGTMP, INST, BINDIR, PYTHONDIR, COVERAGE_FILE |
786 TESTDIR = os.environ["TESTDIR"] = os.getcwd() | 791 TESTDIR = os.environ["TESTDIR"] = os.getcwd() |
787 if options.tmpdir: | 792 if options.tmpdir: |
788 options.keep_tmpdir = True | 793 options.keep_tmpdir = True |