Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tools/tests/mp_match_authentication_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,10 @@ def locate_msvc() -> tuple[Path, str] | None:
def executable_contract() -> None:
temp_root = ROOT / ".tmp"
temp_root.mkdir(exist_ok=True)
with tempfile.TemporaryDirectory(prefix="match-auth-", dir=temp_root) as temp:
# The Windows ARM64 runners refuse to delete the just-run harness executable
# (WinError 5) after the checks pass; a leftover file in .tmp must not turn
# that pass into a failure.
with tempfile.TemporaryDirectory(prefix="match-auth-", dir=temp_root, ignore_cleanup_errors=True) as temp:
temp_dir = Path(temp)
harness = temp_dir / "match_authentication_contract.cpp"
executable = temp_dir / "match_authentication_contract.exe"
Expand Down
15 changes: 12 additions & 3 deletions tools/tests/mp_match_pause_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,10 @@ def compile_deadline_harness() -> None:

tmp_root = ROOT / ".tmp"
tmp_root.mkdir(exist_ok=True)
with tempfile.TemporaryDirectory(prefix="mp-pause-contract-", dir=tmp_root) as raw:
# The Windows ARM64 runners refuse to delete the just-run harness executable
# (WinError 5) after the checks pass; a leftover file in .tmp must not turn
# that pass into a failure.
with tempfile.TemporaryDirectory(prefix="mp-pause-contract-", dir=tmp_root, ignore_cleanup_errors=True) as raw:
temp = Path(raw)
source = temp / "deadline_harness.cpp"
source.write_text(
Expand Down Expand Up @@ -484,7 +487,10 @@ def compile_prediction_clock_harness() -> None:
compiler = shutil.which("clang++") or shutil.which("g++") or shutil.which("c++")
if compiler is None:
raise AssertionError("client prediction clock check requires a C++ compiler")
with tempfile.TemporaryDirectory(prefix="mp-pause-prediction-", dir=ROOT / ".tmp") as raw:
# The Windows ARM64 runners refuse to delete the just-run harness executable
# (WinError 5) after the checks pass; a leftover file in .tmp must not turn
# that pass into a failure.
with tempfile.TemporaryDirectory(prefix="mp-pause-prediction-", dir=ROOT / ".tmp", ignore_cleanup_errors=True) as raw:
temp = Path(raw)
source, executable = temp / "prediction.cpp", temp / "prediction.exe"
source.write_text(source_text, encoding="utf-8")
Expand Down Expand Up @@ -658,7 +664,10 @@ def compile_match_clock_harness() -> None:

tmp_root = ROOT / ".tmp"
tmp_root.mkdir(exist_ok=True)
with tempfile.TemporaryDirectory(prefix="mp-match-clock-", dir=tmp_root) as raw:
# The Windows ARM64 runners refuse to delete the just-run harness executable
# (WinError 5) after the checks pass; a leftover file in .tmp must not turn
# that pass into a failure.
with tempfile.TemporaryDirectory(prefix="mp-match-clock-", dir=tmp_root, ignore_cleanup_errors=True) as raw:
temp = Path(raw)
source = temp / "match_clock_harness.cpp"
source.write_text(MATCH_CLOCK_HARNESS.lstrip(), encoding="utf-8", newline="\n")
Expand Down
5 changes: 4 additions & 1 deletion tools/tests/mp_match_teams_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,10 @@ def locate_msvc() -> tuple[Path, str] | None:
def executable_contract() -> None:
temp_root = ROOT / ".tmp"
temp_root.mkdir(exist_ok=True)
with tempfile.TemporaryDirectory(prefix="match-teams-", dir=temp_root) as temp:
# The Windows ARM64 runners refuse to delete the just-run harness executable
# (WinError 5) after the checks pass; a leftover file in .tmp must not turn
# that pass into a failure.
with tempfile.TemporaryDirectory(prefix="match-teams-", dir=temp_root, ignore_cleanup_errors=True) as temp:
temp_dir = Path(temp)
harness = temp_dir / "match_teams_contract.cpp"
executable = temp_dir / "match_teams_contract.exe"
Expand Down
Loading