1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

gnu-json-result: add checks to the script

This commit is contained in:
Sylvestre Ledru 2025-03-16 08:56:25 +01:00
parent 4c428ec592
commit d0201da89d

View file

@ -9,7 +9,16 @@ from pathlib import Path
out = {}
if len(sys.argv) != 2:
print("Usage: python gnu-json-result.py <gnu_test_directory>")
sys.exit(1)
test_dir = Path(sys.argv[1])
if not test_dir.is_dir():
print(f"Directory {test_dir} does not exist.")
sys.exit(1)
# Test all the logs from the test execution
for filepath in test_dir.glob("**/*.log"):
path = Path(filepath)
current = out