883 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
18 lines
1.5 KiB
Python
18 lines
1.5 KiB
Python
#!/usr/bin/env python3
|
|
"""Owned Windows fixture; does not call Forever or claim gameplay compatibility."""
|
|
import os,shutil,subprocess,sys
|
|
from pathlib import Path
|
|
ROOT=Path(__file__).resolve().parents[1];sys.path.insert(0,str(ROOT/'ops'))
|
|
if not all(shutil.which(t) for t in ('clang','lld-link','wine')) or not (ROOT/'runtime/native-wine-prefix/gateway-private-prefix.json').exists():
|
|
print('SKIP: requires local Windows toolchain and private test prefix');sys.exit(77)
|
|
from build_wine_wire import FLAGS,LIBS
|
|
from wine_console import run_console
|
|
folder=ROOT/'build/channel-fixture';folder.mkdir(exist_ok=True);obj=folder/'policy.obj';exe=folder/'policy.exe'
|
|
subprocess.run(['clang',*FLAGS,'-c',str(ROOT/'tests/engine_channel_win_fixture.c'),'-o',str(obj)],check=True)
|
|
subprocess.run(['lld-link','/entry:fixture_start','/subsystem:console','/nodefaultlib','/timestamp:0','/out:'+str(exe),str(obj),str(LIBS[2]),str(LIBS[3])],check=True)
|
|
env=dict(os.environ,WINEPREFIX=str(ROOT/'runtime/native-wine-prefix'),WINEDEBUG='-all')
|
|
for key in ('LD_PRELOAD','GW_NATIVE_BOOTSTRAP','GW_NATIVE_EXPECTED_EXE','GW_NATIVE_REGISTER'):env.pop(key,None)
|
|
r=run_console(['wine',str(exe)],env=env,timeout=15)
|
|
assert r.returncode==0,f'Owned channel fixture failed at check{r.returncode}; no raw process output exported'
|
|
print('Owned channel policy: proof/state gates, original-lock ownership, FIFO send/destroy/release, cursor bounds, disable, verified-world suspension/resume,32-node budget and thread rejection passed. No game function called.')
|