Mercurial > hg-stable
changeset 14340:defa319d8bb7
run-tests: replace chdir() with Popen cwd option
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 16 May 2011 21:56:26 +0200 |
parents | ed0bf8e1cd28 |
children | 5c3de67e7402 |
files | tests/run-tests.py |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Mon May 16 21:54:43 2011 +0200 +++ b/tests/run-tests.py Mon May 16 21:56:26 2011 +0200 @@ -60,13 +60,10 @@ closefds = os.name == 'posix' def Popen4(cmd, wd, timeout): processlock.acquire() - orig = os.getcwd() - os.chdir(wd) - p = subprocess.Popen(cmd, shell=True, bufsize=-1, + p = subprocess.Popen(cmd, shell=True, bufsize=-1, cwd=wd, close_fds=closefds, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - os.chdir(orig) processlock.release() p.fromchild = p.stdout