Skip to content

Commit d0201da

Browse files
committed
gnu-json-result: add checks to the script
1 parent 4c428ec commit d0201da

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

util/gnu-json-result.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@
99

1010
out = {}
1111

12+
if len(sys.argv) != 2:
13+
print("Usage: python gnu-json-result.py <gnu_test_directory>")
14+
sys.exit(1)
15+
1216
test_dir = Path(sys.argv[1])
17+
if not test_dir.is_dir():
18+
print(f"Directory {test_dir} does not exist.")
19+
sys.exit(1)
20+
21+
# Test all the logs from the test execution
1322
for filepath in test_dir.glob("**/*.log"):
1423
path = Path(filepath)
1524
current = out

0 commit comments

Comments
 (0)