Skip to content

Commit e43dbb9

Browse files
JukkaLIvan Levkivskyi
authored andcommitted
Work around mypyc test failures in CI (#13593)
Temporary workaround to #13572 that slows down mypyc tests.
1 parent 64add91 commit e43dbb9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

mypyc/test/test_run.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import shutil
1111
import subprocess
1212
import sys
13+
import time
1314
from typing import Any, Iterator, cast
1415

1516
from mypy import build
@@ -167,6 +168,12 @@ def run_case_inner(self, testcase: DataDrivenTestCase) -> None:
167168
# new by distutils, shift the mtime of all of the
168169
# generated artifacts back by a second.
169170
fudge_dir_mtimes(WORKDIR, -1)
171+
# On Ubuntu, changing the mtime doesn't work reliably. As
172+
# a workaround, sleep.
173+
#
174+
# TODO: Figure out a better approach, since this slows down tests.
175+
if sys.platform == "linux":
176+
time.sleep(1.0)
170177

171178
step += 1
172179
with chdir_manager(".."):

0 commit comments

Comments
 (0)