upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/scripts/run_wine_tests.py
diff options
context:
space:
mode:
authorbbareth <179921368+BBareth@users.noreply.github.com>2026-11-22 18:11:11 +0100
committerbbareth <179921368+BBareth@users.noreply.github.com>2026-11-22 18:11:11 +0100
commit2e4c86c2d2f8958e6e651f00bbf4c10ff1806d81 (patch)
tree265d3967d4ff5634f0a62645db48a3ee8e884ea6 /scripts/run_wine_tests.py
parent49475796c226c8511b9470bf97a4daf57b8af323 (diff)
run_wine_tests: reject malformed CTest inventories before launching
Diffstat (limited to 'scripts/run_wine_tests.py')
-rw-r--r--scripts/run_wine_tests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/run_wine_tests.py b/scripts/run_wine_tests.py
index 0a02525e5..5bdc5dd72 100644
--- a/scripts/run_wine_tests.py
+++ b/scripts/run_wine_tests.py
@@ -202,10 +202,11 @@ def read_tests(path: str) -> list[dict] | None:
202 except (OSError, ValueError) as e: 202 except (OSError, ValueError) as e:
203 print(f"ERROR: cannot read {path}: {e}", file=sys.stderr) 203 print(f"ERROR: cannot read {path}: {e}", file=sys.stderr)
204 return None 204 return None
205 if not isinstance(doc, dict) or not isinstance(doc.get("tests", []), list): 205 tests = doc.get("tests") if isinstance(doc, dict) else None
206 if not isinstance(tests, list) or not all(isinstance(t, dict) for t in tests):
206 print(f"ERROR: {path} is not the output of ctest --show-only=json-v1", file=sys.stderr) 207 print(f"ERROR: {path} is not the output of ctest --show-only=json-v1", file=sys.stderr)
207 return None 208 return None
208 return doc.get("tests", []) 209 return tests
209 210
210 211
211def main() -> int: 212def main() -> int: