Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around mypyc test failures in CI #13593

Merged
merged 2 commits into from Sep 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions mypyc/test/test_run.py
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 @@ -169,6 +170,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