Skip to content

Commit

Permalink
Work around mypyc test failures in CI (#13593)
Browse files Browse the repository at this point in the history
Temporary workaround to #13572 that slows down mypyc tests.
  • Loading branch information
JukkaL authored and Ivan Levkivskyi committed Sep 9, 2022
1 parent 64add91 commit e43dbb9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mypyc/test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import shutil
import subprocess
import sys
import time
from typing import Any, Iterator, cast

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

step += 1
with chdir_manager(".."):
Expand Down

0 comments on commit e43dbb9

Please sign in to comment.