changeset 5388:557e4a916e12

run-tests.py: allow a different temporary directory to be specified
author Bryan O'Sullivan <bos@serpentine.com>
date Fri, 05 Oct 2007 12:42:52 -0700
parents 4b6f0aa568e5
children 26c060922085
files tests/run-tests.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Fri Oct 05 12:30:19 2007 -0700
+++ b/tests/run-tests.py	Fri Oct 05 12:42:52 2007 -0700
@@ -47,6 +47,8 @@
     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['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