fifa17-recon: reconcile authoritative tools with running backend (B)
- Add 8 files present in docker/fifa17-python/tools but missing from the top-level tree: fut_accounts.py + 7 test_*.py contracts (all committed in the server's docker tree; byte-identical to the running image). - Preserve newer responder work already matching the running container: utas_server.py (offlineSeason), lsx_responder_v2.py (OPENFUT_BIND), blaze_responder_v3b.py, autopatch.py, pow_server.py, fut_store.py, test_fut_contract.py, fifa17-hook-m1.sh. - Add 30 newer ghidra_queries (draft purchase/state, SBC 9-26, runtime registries). Local tree is now a strict superset of B with all shared files byte-identical.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Regression: autopatch logging is per-launcher/user writable.
|
||||
|
||||
The watcher is run with a definitely-absent launcher PID, so it writes its
|
||||
startup/ownership-exit diagnostics and terminates without touching FIFA.
|
||||
"""
|
||||
import os
|
||||
import pathlib
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
|
||||
def main():
|
||||
script = pathlib.Path(__file__).with_name("autopatch.py")
|
||||
with tempfile.TemporaryDirectory(prefix="openfut-autopatch-test-") as root:
|
||||
log_path = pathlib.Path(root) / "autopatch.log"
|
||||
env = os.environ.copy()
|
||||
env["OPENFUT_AUTOPATCH_LOG"] = str(log_path)
|
||||
result = subprocess.run(
|
||||
[sys.executable, str(script), "--launcher-pid", "999999999"],
|
||||
env=env,
|
||||
text=True,
|
||||
capture_output=True,
|
||||
timeout=5,
|
||||
)
|
||||
assert result.returncode == 0, result.stderr or result.stdout
|
||||
assert log_path.is_file(), "OPENFUT_AUTOPATCH_LOG was ignored"
|
||||
text = log_path.read_text()
|
||||
assert "watching for FIFA17.exe" in text
|
||||
assert "launcher pid 999999999 exited" in text
|
||||
print("autopatch writable-log override: PASS")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user