changeset 47179:6f976d54946c

run-tests: use the same python version for shebang lines on Windows The latest py3 is used if the minor number isn't specified. After running the script to install all of the build dependencies, that moved the default from 3.8 to 3.9 on the CI system. That in turn caused a bunch of tests to be skipped that were running prior, even when the test runner was invoked with `py -3.8`. While we should almost always use the latest version, we really shouldn't make it hard to test different versions or allow things to randomly break in subtle ways like that. Differential Revision: https://phab.mercurial-scm.org/D10702
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 08 May 2021 00:21:31 -0400
parents 63286e0886a6
children df2bf38ac382
files tests/run-tests.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Fri May 14 10:01:29 2021 +0000
+++ b/tests/run-tests.py	Sat May 08 00:21:31 2021 -0400
@@ -3537,7 +3537,7 @@
             if os.getenv('MSYSTEM'):
                 with open(osenvironb[b'RUNTESTDIR'] + b'/python3', 'wb') as f:
                     f.write(b'#!/bin/sh\n')
-                    f.write(b'py -3 "$@"\n')
+                    f.write(b'py -3.%d "$@"\n' % sys.version_info[1])
 
             exedir, exename = os.path.split(sysexecutable)
             vlog(