#!/usr/bin/env python3 """Validate every source environment and optionally the complete exported release. Usage: python3 tools/validate.py [--exported] [--docker] """ import subprocess,sys from pathlib import Path ROOT=Path(__file__).resolve().parents[1] def run(*args): subprocess.run([sys.executable]+list(args),cwd=str(ROOT),check=True) for path in sorted((ROOT/'envs').glob('*/env.toml')): run('tools/selftest.py',path.parent.name,'60') for path in sorted((ROOT/'tests').glob('test_*.py')): run(str(path)) if '--exported' in sys.argv: run('tools/check_tasks.py') if '--docker' in sys.argv: run('tools/check_tasks.py','--docker','4')