Skip to content

Commit 38eb6e8

Browse files
authored
Work around mypyc test failures in CI (#13593)
Temporary workaround to #13572 that slows down mypyc tests.
1 parent 3c7e216 commit 38eb6e8

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
@@ -169,6 +170,12 @@ def run_case_inner(self, testcase: DataDrivenTestCase) -> None:
169170
# new by distutils, shift the mtime of all of the
170171
# generated artifacts back by a second.
171172
fudge_dir_mtimes(WORKDIR, -1)
173+
# On Ubuntu, changing the mtime doesn't work reliably. As
174+
# a workaround, sleep.
175+
#
176+
# TODO: Figure out a better approach, since this slows down tests.
177+
if sys.platform == "linux":
178+
time.sleep(1.0)
172179

173180
step += 1
174181
with chdir_manager(".."):

0 commit comments

Comments
 (0)