tests/run-tests: Change default Python command used on Windows.

Default to just calling python since that is most commonly available: the
official installer or zipfiles from python.org, anaconda, nupkg all result
in python being available but not python3.  In other words: the default
used so far is wrong.  Note that os.name is 'posix' when running the python
version which comes with Cygwin or MSys2 so they are not affected by this.
However of all possible ways to get Python on Windows, only Cygwin provides
no python command so update the default way for running tests in the
README.
This commit is contained in:
stijn 2021-01-14 13:23:15 +01:00 committed by Damien George
parent 5ef71cd167
commit 0397448501
2 changed files with 5 additions and 1 deletions

View File

@ -90,6 +90,10 @@ Running the tests
This is similar for all ports:
cd ../../tests
python ./run-tests
Though when running on Cygwin and using Cygwin's Python installation you'll need:
python3 ./run-tests
Depending on the combination of platform and Python version used it might be

View File

@ -20,7 +20,7 @@ def base_path(*p):
# is of lower version, you can point MICROPY_CPYTHON3 environment var
# to the correct executable.
if os.name == 'nt':
CPYTHON3 = os.getenv('MICROPY_CPYTHON3', 'python3.exe')
CPYTHON3 = os.getenv('MICROPY_CPYTHON3', 'python')
MICROPYTHON = os.getenv('MICROPY_MICROPYTHON', base_path('../ports/windows/micropython.exe'))
else:
CPYTHON3 = os.getenv('MICROPY_CPYTHON3', 'python3')