From 12823b67344c24b893d0ed04f99abb119575ffc2 Mon Sep 17 00:00:00 2001 From: themuffinator Date: Wed, 26 Aug 2026 19:58:16 +0100 Subject: [PATCH] Honor custom GameLibs paths in settings validation --- tools/tests/settings_menu_coverage.py | 5 ++++- tools/tests/validation_hardening.py | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/tests/settings_menu_coverage.py b/tools/tests/settings_menu_coverage.py index 1900f765..9f8bfd5c 100644 --- a/tools/tests/settings_menu_coverage.py +++ b/tools/tests/settings_menu_coverage.py @@ -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: diff --git a/tools/tests/validation_hardening.py b/tools/tests/validation_hardening.py index c8815bb5..0f88ac8c 100644 --- a/tools/tests/validation_hardening.py +++ b/tools/tests/validation_hardening.py @@ -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") @@ -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 = {