[PATCH] run-tests: when running in parallel, delete tmpdirs immediately
Siddharth Agarwal
sid0 at fb.com
Fri May 3 17:19:29 CDT 2013
# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1367619501 25200
# Fri May 03 15:18:21 2013 -0700
# Node ID d178d0c3755136cf99c3db927e3a9821e5c422eb
# Parent 5b1eee82099afb53293265c390a07a3a5ebc2970
run-tests: when running in parallel, delete tmpdirs immediately
This is especially important if extensions that use inotify are enabled,
because it's very easy to hit the inotify max_user_instances limit without
this.
diff -r 5b1eee82099a -r d178d0c37551 tests/run-tests.py
--- a/tests/run-tests.py Fri Apr 26 20:47:34 2013 -0700
+++ b/tests/run-tests.py Fri May 03 15:18:21 2013 -0700
@@ -1125,6 +1125,8 @@ def runchildren(options, tests):
childopts = ['--child=%d' % wfd, '--port=%d' % (options.port + j * 3)]
childtmp = os.path.join(HGTMP, 'child%d' % j)
childopts += ['--tmpdir', childtmp]
+ if options.keep_tmpdir:
+ childopts.append('--keep-tmpdir')
cmdline = [PYTHON, sys.argv[0]] + opts + childopts + job
vlog(' '.join(cmdline))
proc = subprocess.Popen(cmdline, executable=cmdline[0])
@@ -1293,7 +1295,8 @@ def main():
global TESTDIR, HGTMP, INST, BINDIR, PYTHONDIR, COVERAGE_FILE
TESTDIR = os.environ["TESTDIR"] = os.getcwd()
if options.tmpdir:
- options.keep_tmpdir = True
+ if not options.child:
+ options.keep_tmpdir = True
tmpdir = options.tmpdir
if os.path.exists(tmpdir):
# Meaning of tmpdir has changed since 1.3: we used to create
More information about the Mercurial-devel
mailing list