Mercurial > hg
changeset 39379:b64d36e5ca31
run-tests: replace '/dev/null' with os.devnull for Windows
Many of the *.py tests were dying on:
File "c:\Users\Matt\projects\hg\hgdemandimport\tracing.py", line 27, in log
_pipe = open(os.environ['HGCATAPULTSERVERPIPE'], 'w', 1)
IOError: [Errno 2] $ENOENT$: '/dev/null'
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 29 Aug 2018 23:39:58 -0400 |
parents | 0f549da54379 |
children | 1099d9bbdf9a |
files | tests/run-tests.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Mon Aug 27 09:13:58 2018 -0700 +++ b/tests/run-tests.py Wed Aug 29 23:39:58 2018 -0400 @@ -1072,7 +1072,7 @@ env["HGHOSTNAME"] = "test-hostname" env['HGIPV6'] = str(int(self._useipv6)) if 'HGCATAPULTSERVERPIPE' not in env: - env['HGCATAPULTSERVERPIPE'] = '/dev/null' + env['HGCATAPULTSERVERPIPE'] = os.devnull extraextensions = [] for opt in self._extraconfigopts: @@ -1390,7 +1390,7 @@ script.append(b'alias pwd="pwd -W"\n') hgcatapult = os.getenv('HGCATAPULTSERVERPIPE') - if hgcatapult and hgcatapult != '/dev/null': + if hgcatapult and hgcatapult != os.devnull: # Kludge: use a while loop to keep the pipe from getting # closed by our echo commands. The still-running file gets # reaped at the end of the script, which causes the while