--- a/tests/fsmonitor-run-tests.py Thu Mar 05 18:19:21 2020 +0100
+++ b/tests/fsmonitor-run-tests.py Fri Mar 06 09:50:57 2020 +0100
@@ -30,7 +30,7 @@
PYTHON3 = True
xrange = range # we use xrange in one place, and we'd rather not use range
- def _bytespath(p):
+ def _sys2bytes(p):
return p.encode('utf-8')
@@ -47,7 +47,7 @@
# bytestrings by default, so we don't have to do any extra
# fiddling there. We define the wrapper functions anyway just to
# help keep code consistent between platforms.
- def _bytespath(p):
+ def _sys2bytes(p):
return p
@@ -107,7 +107,7 @@
]
envb = osenvironb.copy()
- envb[b'WATCHMAN_CONFIG_FILE'] = _bytespath(cfgfile)
+ envb[b'WATCHMAN_CONFIG_FILE'] = _sys2bytes(cfgfile)
with open(clilogfile, 'wb') as f:
proc = subprocess.Popen(
argv, env=envb, stdin=None, stdout=f, stderr=f
@@ -129,7 +129,7 @@
args, runtestsargv = parser.parse_known_args()
with watchman(args) as sockfile:
- osenvironb[b'WATCHMAN_SOCK'] = _bytespath(sockfile)
+ osenvironb[b'WATCHMAN_SOCK'] = _sys2bytes(sockfile)
# Indicate to hghave that we're running with fsmonitor enabled.
osenvironb[b'HGFSMONITOR_TESTS'] = b'1'