Skip to content

Commit db52b2d

Browse files
committed
[GR-46580] Disable transiently failing tests
PullRequest: graalpython/2830
2 parents 69792a2 + 347abce commit db52b2d

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

graalpython/com.oracle.graal.python.test/src/graalpytest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@
7474
'test_int',
7575
]
7676

77-
7877
# A list of tests with minor transient issues, which can be retried once
7978
TRANSIENTS = [
8079
'test_multiprocessing_spawn',
8180
'test_weakref',
8281
'test_ssl',
8382
'test_threading',
83+
'test_asyncio',
8484
]
8585

8686
os = sys.modules.get("posix", sys.modules.get("nt", None))

graalpython/com.oracle.graal.python.test/src/tests/test_fcntl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -99,6 +99,7 @@ def test_flock_s_and_x(self):
9999

100100
@unittest.skipUnless(__graalpython__.posix_module_backend() != 'java', 'No support in Truffle API (GR-28740)')
101101
@unittest.skipUnless(sys.platform != 'darwin', 'MacOSX does not have flock utility')
102+
@unittest.skipUnless("graalpython" in os.environ.get("BITBUCKET_REPO_URL", "graalpython"), "Do not run this in auxillary CI jobs, it can be flaky")
102103
def test_flock_s_and_s(self):
103104
os.close(os.open(TEST_FILENAME_FULL_PATH, os.O_WRONLY | os.O_CREAT))
104105
file = os.open(TEST_FILENAME_FULL_PATH, os.O_WRONLY)

graalpython/com.oracle.graal.python.test/src/tests/test_tagged_unittests.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@
5555
RUNNER = os.path.join(os.path.dirname(__file__), "run_cpython_test.py")
5656
LINE = "=" * 80
5757

58+
# some CI platforms are more unstable then others when it comes to tests
59+
# involving many files, sockets, or threads. We skip some tests on some
60+
# platforms
61+
SKIPLIST = (
62+
("darwin", None, "test_smtplib"),
63+
("darwin", None, "test_imaplib"),
64+
(None, "arm", "test_smtplib"),
65+
(None, "aarch64", "test_imaplib"),
66+
(None, "arm", "test_multiprocessing_spawn"),
67+
(None, "aarch64", "test_multiprocessing_spawn"),
68+
)
69+
5870

5971
def grouper(iterable, n):
6072
args = [iter(iterable)] * n
@@ -169,7 +181,17 @@ class TestTaggedUnittests(unittest.TestCase):
169181
selection = set(s.strip() for s in selection.split(","))
170182
working_tests = [x for x in working_tests if x[0] in selection]
171183

184+
this_os = sys.platform
185+
this_machine = os.uname().machine
172186
for idx, working_test in enumerate(working_tests):
187+
if os.environ.get("CI", None) and any(
188+
(os is None or os in this_os)
189+
and (machine is None or machine in this_machine)
190+
and test == working_test[0]
191+
for os, machine, test in SKIPLIST
192+
):
193+
print("Skipping test from skiplist for this platform:", working_test[0])
194+
continue
173195
fn = make_test_function(working_test)
174196
fn.__name__ = "%s[%d/%d]" % (fn.__name__, idx + 1, len(working_tests))
175197
fn.__qualname__ = "%s.%s" % (TestTaggedUnittests.__name__, fn.__name__)

0 commit comments

Comments
 (0)