Mercurial > hg-stable
changeset 47576:c3c38eb08465
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
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 09 Jul 2021 16:28:45 +0200 |
parents | 27fb9f32e1a3 |
children | 2ee81806831f |
files | tests/run-tests.py |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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: