Download run_checks.py from PureOne/NYARION-FS-8.0-Transactional-Storage-Engine: direct link, hf CLI and curl.
- Browser
- Download file 1.59 kB
-
https://huggingface.co/datasets/PureOne/NYARION-FS-8.0-Transactional-Storage-Engine/resolve/main/run_checks.py
- Command line
-
hf download hf://datasets/PureOne/NYARION-FS-8.0-Transactional-Storage-Engine/run_checks.py
-
curl -L -o run_checks.py https://huggingface.co/datasets/PureOne/NYARION-FS-8.0-Transactional-Storage-Engine/resolve/main/run_checks.py
1.59 kB
| #!/usr/bin/env python3 | |
| """Reproduce functional evidence without rerunning or overwriting frozen timing.""" | |
| import hashlib | |
| from pathlib import Path | |
| import subprocess | |
| import sys | |
| ROOT = Path(__file__).resolve().parent | |
| def main(): | |
| source = ROOT / 'pagefs.py' | |
| before_hash = hashlib.sha256(source.read_bytes()).hexdigest() | |
| (ROOT / 'evidence').mkdir(exist_ok=True) | |
| jobs = [ | |
| ('tests.txt', ['-m', 'unittest', 'discover', '-s', 'tests', '-v']), | |
| ('reuse_model.txt', ['verify_reuse_model.py']), | |
| ('crash_images.txt', ['verify_crash_images.py']), | |
| ('sequences.txt', ['verify_sequences.py']), | |
| ('compatibility.txt', ['experiments/verify_compatibility.py']), | |
| ('admission.txt', ['experiments/verify_admission.py']), | |
| ('reservation_bound.txt', ['experiments/verify_reservation_bound.py']), | |
| ('weighted_budget.txt', ['experiments/verify_weighted_budget.py']), | |
| ] | |
| for name, args in jobs: | |
| result = subprocess.run([sys.executable, *args], cwd=ROOT, | |
| stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) | |
| (ROOT / 'evidence' / name).write_text(result.stdout) | |
| print(f'{name}: {"passed" if result.returncode == 0 else "FAILED"}', flush=True) | |
| if result.returncode: | |
| print(result.stdout) | |
| raise SystemExit(result.returncode) | |
| assert hashlib.sha256(source.read_bytes()).hexdigest() == before_hash, 'engine changed during checks' | |
| print('All functional checks passed; engine SHA-256 ' + before_hash) | |
| if __name__ == '__main__': | |
| main() | |