You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
40 lines
1.2 KiB
from __future__ import annotations
|
|
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parent.parent
|
|
|
|
SCENARIOS = {
|
|
"basic": "scripts/real_openlist_acceptance.py",
|
|
"single_chaos": "scripts/real_openlist_chaos_acceptance.py",
|
|
"multi_basic": "scripts/real_openlist_multi_backend_acceptance.py",
|
|
"multi_chaos": "scripts/real_openlist_multi_backend_chaos.py",
|
|
}
|
|
|
|
|
|
def main() -> int:
|
|
selected = os.getenv(
|
|
"IRON_ACCEPTANCE_SCENARIOS",
|
|
"basic,single_chaos,multi_basic,multi_chaos",
|
|
)
|
|
scenario_names = [item.strip() for item in selected.split(",") if item.strip()]
|
|
if not scenario_names:
|
|
raise RuntimeError("IRON_ACCEPTANCE_SCENARIOS did not contain any scenarios.")
|
|
|
|
for name in scenario_names:
|
|
script = SCENARIOS.get(name)
|
|
if script is None:
|
|
known = ", ".join(sorted(SCENARIOS))
|
|
raise RuntimeError(f"unknown scenario {name!r}; expected one of: {known}")
|
|
print(f"\n=== running {name}: {script} ===", flush=True)
|
|
subprocess.run([sys.executable, script], cwd=ROOT, check=True)
|
|
|
|
print("\nReal OpenList acceptance suite passed.", flush=True)
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|
|
|