Skip to content
Merged
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/settings_menu_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@

from collections import defaultdict
import json
import os
from pathlib import Path
import re


ROOT = Path(__file__).resolve().parents[2]
GAME_LIBS = ROOT.parent / "openQ4-game"
GAME_LIBS = Path(
os.environ.get("OPENQ4_GAMELIBS_REPO", ROOT.parent / "openQ4-game")
).resolve()


def read(path: Path) -> str:
Expand Down
6 changes: 6 additions & 0 deletions tools/tests/validation_hardening.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@ def fake_run_command(command, *, cwd, env, title, dry_run) -> None:

def validate_validation_wiring() -> None:
validator = (ROOT / "tools" / "validation" / "openq4_validate.py").read_text(encoding="utf-8")
settings_coverage = (ROOT / "tools" / "tests" / "settings_menu_coverage.py").read_text(
encoding="utf-8"
)
push = (ROOT / ".github" / "workflows" / "push-verification.yml").read_text(encoding="utf-8")
commit = (ROOT / ".github" / "workflows" / "commit-validation.yml").read_text(encoding="utf-8")
release_notes = (ROOT / "docs/dev" / "release-completion.md").read_text(encoding="utf-8")
Expand Down Expand Up @@ -618,6 +621,9 @@ def validate_validation_wiring() -> None:
if "validation_hardening.py" not in text:
raise AssertionError(f"validation_hardening.py is not wired into {context}")

if 'os.environ.get("OPENQ4_GAMELIBS_REPO"' not in settings_coverage:
raise AssertionError("settings menu coverage ignores the configured GameLibs repository")

# Runtime drivers that need a built target package or retail assets; their
# static contracts are wired into lightweight local validation instead.
smoke_wiring_allowlist = {
Expand Down
Loading