Skip to content

Commit 731ae51

Browse files
committed
simply exclude all tests on windows that don't yet work
now the gate tags python-unittest, python-svm-unittest, python-junit, python-svm, python-graalvm, python-unittest-multi-context pass on windows
1 parent 2ce3a3c commit 731ae51

File tree

1 file changed

+58
-35
lines changed

1 file changed

+58
-35
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 58 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,10 @@ def run_python_unittests(python_binary, args=None, paths=None, aot_compatible=Fa
960960
else:
961961
if WIN32:
962962
size = 5
963-
testfiles = [testfiles[i:i + size] for i in range(0, len(testfiles), size)]
963+
# Windows has problems with long commandlines and with file locks
964+
# when running multiple cpyext tests in the same process
965+
pytests = [t for t in testfiles if "cpyext" not in t]
966+
testfiles = [pytests[i:i + size] for i in range(0, len(pytests), size)] + [[t] for t in testfiles if "cpyext" in t]
964967
else:
965968
testfiles = [testfiles]
966969

@@ -1161,41 +1164,61 @@ def graalpython_gate_runner(args, tasks):
11611164
report = lambda: (not is_collecting_coverage()) and task
11621165
nonZeroIsFatal = not is_collecting_coverage()
11631166
if WIN32:
1164-
# Windows support is still experimental. we exclude a number of our
1165-
# unittests on Windows for now. If you add unittests and cannot get
1166-
# them to work on Windows, yet, add their files here.
1167+
# Windows support is still experimental, so we exclude some unittests
1168+
# on Windows for now. If you add unittests and cannot get them to work
1169+
# on Windows, yet, add their files here.
11671170
excluded_tests = [
1168-
"test_zipimport.py", # sys.getwindowsversion
1169-
"test_thread", # sys.getwindowsversion
1170-
"test_structseq", # import posix
1171-
"test_ssl", # from_ssl import enum_certificates
1172-
"test_posix", # import posix
1173-
"test_multiprocessing", # import _winapi
1174-
"test_mmap", # sys.getwindowsversion
1175-
"test_imports", # import posix
1176-
"test_ctypes_callbacks.py", # ctypes error
11771171
"test_code.py", # forward slash in path problem
1178-
"*/cpyext/test_wiki.py",
1179-
"*/cpyext/test_unicode.py",
1180-
"*/cpyext/test_thread.py",
1181-
"*/cpyext/test_simple.py",
1182-
"*/cpyext/test_object.py",
1183-
"*/cpyext/test_modsupport.py",
1184-
"*/cpyext/test_mmap.py",
1185-
"*/cpyext/test_mixed_inheritance.py",
1186-
"*/cpyext/test_method.py",
1187-
"*/cpyext/test_memoryview.py",
1188-
"*/cpyext/test_member.py",
1189-
"*/cpyext/test_long.py",
1190-
"*/cpyext/test_functions.py",
1191-
"*/cpyext/test_float.py",
1192-
"*/cpyext/test_exceptionobject.py",
1193-
"*/cpyext/test_err.py",
1194-
"*/cpyext/test_descr.py",
1195-
"*/cpyext/test_datetime.py",
1196-
"*/cpyext/test_bytes.py",
1197-
"*/cpyext/test_bool.py",
1172+
"test_csv.py",
1173+
"test_ctypes_callbacks.py", # ctypes error
1174+
"test_imports.py", # import posix
1175+
"test_math.py",
1176+
"test_memoryview.py",
1177+
"test_mmap.py", # sys.getwindowsversion
1178+
"test_multiprocessing.py", # import _winapi
1179+
"test_patched_pip.py",
1180+
"test_pathlib.py",
1181+
"test_posix.py", # import posix
1182+
"test_pyio.py",
1183+
"test_signal.py",
1184+
"test_ssl.py", # from_ssl import enum_certificates
1185+
"test_struct.py",
1186+
"test_structseq.py", # import posix
1187+
"test_subprocess.py",
1188+
"test_thread.py", # sys.getwindowsversion
1189+
"test_traceback.py",
1190+
"test_venv.py",
1191+
"test_zipimport.py", # sys.getwindowsversion
1192+
"test_zlib.py",
1193+
"test_ssl_java_integration.py",
11981194
"*/cpyext/test_abstract.py",
1195+
"*/cpyext/test_bytes.py",
1196+
"*/cpyext/test_cpython_sre.py",
1197+
"*/cpyext/test_datetime.py",
1198+
"*/cpyext/test_descr.py",
1199+
"*/cpyext/test_err.py",
1200+
"*/cpyext/test_exceptionobject.py",
1201+
"*/cpyext/test_float.py",
1202+
"*/cpyext/test_functions.py",
1203+
"*/cpyext/test_gc.py",
1204+
"*/cpyext/test_long.py",
1205+
"*/cpyext/test_member.py",
1206+
"*/cpyext/test_memoryview.py",
1207+
"*/cpyext/test_method.py",
1208+
"*/cpyext/test_misc.py",
1209+
"*/cpyext/test_mixed_inheritance.py",
1210+
"*/cpyext/test_mmap.py",
1211+
"*/cpyext/test_modsupport.py",
1212+
"*/cpyext/test_module.py",
1213+
"*/cpyext/test_object.py",
1214+
"*/cpyext/test_simple.py",
1215+
"*/cpyext/test_slice.py",
1216+
"*/cpyext/test_structseq.py",
1217+
"*/cpyext/test_thread.py",
1218+
"*/cpyext/test_traceback.py",
1219+
"*/cpyext/test_tuple.py",
1220+
"*/cpyext/test_unicode.py",
1221+
"*/cpyext/test_wiki.py",
11991222
]
12001223
else:
12011224
excluded_tests = []
@@ -1293,7 +1316,7 @@ def graalpython_gate_runner(args, tasks):
12931316
python_checkcopyrights([])
12941317

12951318
with Task('GraalPython GraalVM shared-library build', tasks, tags=[GraalPythonTags.shared_object, GraalPythonTags.graalvm], report=True) as task:
1296-
if task:
1319+
if task and not WIN32:
12971320
run_shared_lib_test(python_so())
12981321

12991322
with Task('GraalPython GraalVM sandboxed shared-library build', tasks, tags=[GraalPythonTags.shared_object_sandboxed, GraalPythonTags.graalvm_sandboxed], report=True) as task:
@@ -1315,7 +1338,7 @@ def graalpython_gate_runner(args, tasks):
13151338
assert "Using preinitialized context." in out.data
13161339

13171340
with Task('GraalPython standalone build', tasks, tags=[GraalPythonTags.svm, GraalPythonTags.graalvm, GraalPythonTags.embedding], report=True) as task:
1318-
if task:
1341+
if task and not WIN32:
13191342
svm_image = python_svm()
13201343
with tempfile.TemporaryDirectory() as tmpdir:
13211344
tmpstandalone = os.path.join(tmpdir, "target")

0 commit comments

Comments
 (0)