Files
troupe-standup/wizard-work/spark/validate_result.py
T

23 lines
693 B
Python

#!/bin/bin/env python3
import json
import sys
path = '/root/troupe-standup/wizard-work/spark/verification_result_20261025.json'
with open(path) as f:
data = json.load(f)
# Verify key fields
checks = [
('python_version' in data, 'has python_version'),
('packages' in data, 'has packages'),
('cli_tools' in data, 'has cli_tools'),
(data.get('status') == 'verified', 'status is verified'),
(data['cli_tools'].get('git', False), 'git available'),
(data['cli_tools'].get('python3', False), 'python3 available'),
]
all_passed = all(c[0] for c in checks)
for passed, desc in checks:
print(f"{'PASS' if passed else 'FAIL'}: {desc}")
sys.exit(0 if all_passed else 1)