26 lines
738 B
Python
26 lines
738 B
Python
|
|
#!/usr/bin/env python3
|
||
|
|
"""Run all read-only checks, retaining failures without hiding later reports."""
|
||
|
|
import pathlib
|
||
|
|
import subprocess
|
||
|
|
import sys
|
||
|
|
|
||
|
|
TOOLS = pathlib.Path(__file__).resolve().parent
|
||
|
|
STAGES = (("register_index.py", "--check"), ("register_check.py",), ("inbox_check.py",))
|
||
|
|
|
||
|
|
|
||
|
|
def main() -> int:
|
||
|
|
failed = False
|
||
|
|
for stage in STAGES:
|
||
|
|
try:
|
||
|
|
result = subprocess.run([sys.executable, str(TOOLS / stage[0]), *stage[1:]])
|
||
|
|
failed = result.returncode != 0 or failed
|
||
|
|
except OSError as exc:
|
||
|
|
print(f"{stage[0]}: could not run: {exc}", flush=True)
|
||
|
|
failed = True
|
||
|
|
print(flush=True)
|
||
|
|
return int(failed)
|
||
|
|
|
||
|
|
|
||
|
|
if __name__ == "__main__":
|
||
|
|
raise SystemExit(main())
|