# HG changeset patch # User Pierre-Yves David # Date 1625840925 -7200 # Node ID c3c38eb08465c034c69ab72665d688339fa2bb64 # Parent 27fb9f32e1a3744bcc4cc898ea94b52e663534dc run-tests: cleanup windows generation of the python / python3 pointeur They are no need to generate then in RUNTESTDIR and we don't need a python2 executable. (because not test ever use `python2` explicitly). This is probably still not perfect, but at least it is better. Differential Revision: https://phab.mercurial-scm.org/D11045 diff -r 27fb9f32e1a3 -r c3c38eb08465 tests/run-tests.py --- a/tests/run-tests.py Fri Jul 09 15:29:58 2021 +0200 +++ b/tests/run-tests.py Fri Jul 09 16:28:45 2021 +0200 @@ -3576,13 +3576,15 @@ # simple script on PATH with that name that delegates to the py3 # launcher so the shebang lines work. if os.getenv('MSYSTEM'): - with open(osenvironb[b'RUNTESTDIR'] + b'/python3', 'wb') as f: + py3exe_name = os.path.join(self._custom_bin_dir, b'python3') + with open(py3exe_name, 'wb') as f: f.write(b'#!/bin/sh\n') f.write(b'py -3.%d "$@"\n' % sys.version_info[1]) - if os.getenv('MSYSTEM'): - with open(osenvironb[b'RUNTESTDIR'] + b'/python2', 'wb') as f: + + pyexe_name = os.path.join(self._custom_bin_dir, b'python') + with open(pyexe_name, 'wb') as f: f.write(b'#!/bin/sh\n') - f.write(b'py -2.%d "$@"\n' % sys.version_info[1]) + f.write(b'py -%d.%d "$@"\n' % sys.version_info[0:2]) exedir, exename = os.path.split(sysexecutable) for pyexename in pyexe_names: