github/workflows: Improve MSYS2-based CI builds.

Install the mingw variant of Python since it behaves more like a 'real'
Windows CPython than the msys2 variant: os.name == 'nt', not 'posix'.  Note
that os.sep is still '/' though so we don't actually need to skip the
import_file test.  This way one single Python version can be used both for
running run-tests.py and getting the expected test output.

Signed-off-by: stijn <stijn@ignitron.net>
This commit is contained in:
stijn
2024-03-26 16:09:15 +01:00
committed by Damien George
parent 233f5ce661
commit a0c7bf12d2
4 changed files with 10 additions and 19 deletions

View File

@@ -3,6 +3,7 @@
import os
import subprocess
import sys
import sysconfig
import platform
import argparse
import inspect
@@ -583,10 +584,6 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1):
# fails with stack overflow on Debug builds
skip_tests.add("misc/sys_settrace_features.py")
if os.getenv("MSYSTEM") is not None:
# fails due to wrong path separator
skip_tests.add("import/import_file.py")
if upy_float_precision == 0:
skip_tests.add("extmod/uctypes_le_float.py")
skip_tests.add("extmod/uctypes_native_float.py")
@@ -711,7 +708,9 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1):
# Some tests use unsupported features on Windows
if os.name == "nt":
skip_tests.add("import/import_file.py") # works but CPython prints forward slashes
if not sysconfig.get_platform().startswith("mingw"):
# Works but CPython uses '\' path separator
skip_tests.add("import/import_file.py")
# Some tests are known to fail with native emitter
# Remove them from the below when they work