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:
authorMax Hurst <256203487+maxhurst131@users.noreply.github.com>2026-11-22 19:33:20 +0000
committerMax Hurst <256203487+maxhurst131@users.noreply.github.com>2026-11-22 19:33:20 +0000
commitf039403efec824e5d2fff6d14d0b8c8cd06b24dd (patch)
treeb8aae0610307f8bd30129f890722e52900d05f42 /scripts/run_wine_tests.py
parent162821017ea3c286c8bec860f3ff94f037912061 (diff)
Honor CTest output-based skips in the Wine runner
Diffstat (limited to 'scripts/run_wine_tests.py')
-rw-r--r--scripts/run_wine_tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/run_wine_tests.py b/scripts/run_wine_tests.py
index 28c7f2f63..851e63f16 100644
--- a/scripts/run_wine_tests.py
+++ b/scripts/run_wine_tests.py
@@ -169,10 +169,13 @@ def run_test(test: dict, args, wine: list[str]) -> tuple[str, str]:
169 if skip_code is not None and code == int(skip_code): 169 if skip_code is not None and code == int(skip_code):
170 return "skip", f"exit {code} (skip) in {elapsed:.1f} s\n{out}" 170 return "skip", f"exit {code} (skip) in {elapsed:.1f} s\n{out}"
171 detail = f"exit {code} in {elapsed:.1f} s\n{out}" 171 detail = f"exit {code} in {elapsed:.1f} s\n{out}"
172 skip_patterns = regex_list(props.get("SKIP_REGULAR_EXPRESSION", []))
172 required = regex_list(props.get("PASS_REGULAR_EXPRESSION", [])) 173 required = regex_list(props.get("PASS_REGULAR_EXPRESSION", []))
173 forbidden = regex_list(props.get("FAIL_REGULAR_EXPRESSION", [])) 174 forbidden = regex_list(props.get("FAIL_REGULAR_EXPRESSION", []))
174 # A required match takes the place of the exit code. A forbidden match overrides either kind of success. 175 # A required match takes the place of the exit code. A forbidden match overrides either kind of success.
175 try: 176 try:
177 if any(re.search(pattern, out, re.DOTALL) for pattern in skip_patterns):
178 return "skip", f"matched CTest SKIP_REGULAR_EXPRESSION: {detail}"
176 passed = any(re.search(pattern, out, re.DOTALL) for pattern in required) if required else code == 0 179 passed = any(re.search(pattern, out, re.DOTALL) for pattern in required) if required else code == 0
177 if any(re.search(pattern, out, re.DOTALL) for pattern in forbidden): 180 if any(re.search(pattern, out, re.DOTALL) for pattern in forbidden):
178 passed = False 181 passed = False