upleb.uk

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

summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 23:08:29 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 23:08:29 -0500
commit21c1d00b0fd4b4e3915befcbbd26ad1ad0b3e8c7 (patch)
tree6eb73ba1e9ade7ede1bf8c27b19abb6c4c9e5f2e /scripts
parent10254f9979f078375e306fe22423beed2f88a939 (diff)
parent1d4d4c6185c54980e4f4434e3d5c5707a0e6fe25 (diff)
Merge pull request #3792 from Vonsek
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/run_wine_tests.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/scripts/run_wine_tests.py b/scripts/run_wine_tests.py
index 7585e2e99..8392c8121 100644
--- a/scripts/run_wine_tests.py
+++ b/scripts/run_wine_tests.py
@@ -297,22 +297,29 @@ def main() -> int:
297 tests = read_tests(args.tests) 297 tests = read_tests(args.tests)
298 if tests is None: 298 if tests is None:
299 return 2 299 return 2
300 dependencies = fixture_dependencies(tests) 300 names = [test.get("name", "?") for test in tests]
301 indices = {name: index for index, name in enumerate(names)}
302 setups = fixture_dependencies(tests)
303 sorter = TopologicalSorter(setups)
304 for index, test in enumerate(tests):
305 # DEPENDS controls order. Only failed fixture setups block a consumer.
306 sorter.add(index, *(indices[name] for name in properties(test).get("DEPENDS", []) if name in indices))
301 try: 307 try:
302 order = list(TopologicalSorter(dependencies).static_order()) 308 order = list(sorter.static_order())
303 except CycleError: 309 except CycleError:
304 print("ERROR: CTest fixture setup dependencies form a cycle", file=sys.stderr) 310 print("ERROR: CTest test dependencies form a cycle", file=sys.stderr)
305 return 2 311 return 2
306 wine = args.wine 312 wine = args.wine
307 results = {} 313 results = {}
314 results_by_index: dict[int, str] = {}
308 prefix = os.environ.get("WINEPREFIX") or os.path.join(os.path.expanduser("~"), ".wine") 315 prefix = os.environ.get("WINEPREFIX") or os.path.join(os.path.expanduser("~"), ".wine")
309 names = [test.get("name", "?") for test in tests]
310 with DriveMap(args.windows_root, args.root, prefix) as drive: 316 with DriveMap(args.windows_root, args.root, prefix) as drive:
311 print(drive.note, flush=True) 317 print(drive.note, flush=True)
312 for index in order: 318 for index in order:
313 name = names[index] 319 name = names[index]
314 failed_setups = tuple(names[setup] for setup in dependencies[index] if results[names[setup]] == "fail") 320 failed_setups = tuple(names[setup] for setup in setups[index] if results_by_index[setup] == "fail")
315 status, detail = run_test(tests[index], args, wine, failed_setups=failed_setups) 321 status, detail = run_test(tests[index], args, wine, failed_setups=failed_setups)
322 results_by_index[index] = status
316 results[name] = status 323 results[name] = status
317 print(f"[{status.upper()}] {name}", flush=True) 324 print(f"[{status.upper()}] {name}", flush=True)
318 if status != "pass": 325 if status != "pass":