# HG changeset patch # User Bryan O'Sullivan # Date 1191613372 25200 # Node ID 557e4a916e12de01d01524992174329a46af2001 # Parent 4b6f0aa568e53c4821c0b2a2bfa8b2ba37c9bb2e run-tests.py: allow a different temporary directory to be specified diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -47,6 +47,8 @@ parser.add_option("-s", "--cover_stdlib" help="print a test coverage report inc. standard libraries") parser.add_option("-t", "--timeout", type="int", help="kill errant tests after TIMEOUT seconds") +parser.add_option("--tmpdir", type="string", + help="run tests in the given temporary directory") parser.add_option("-v", "--verbose", action="store_true", help="output verbose messages") parser.add_option("--with-hg", type="string", @@ -394,7 +396,7 @@ os.environ['LANG'] = os.environ['LC_ALL' os.environ['TZ'] = 'GMT' TESTDIR = os.environ["TESTDIR"] = os.getcwd() -HGTMP = os.environ["HGTMP"] = tempfile.mkdtemp("", "hgtests.") +HGTMP = os.environ['HGTMP'] = tempfile.mkdtemp('', 'hgtests.', options.tmpdir) DAEMON_PIDS = None HGRCPATH = None