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:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/run_wine_tests.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/run_wine_tests.py b/scripts/run_wine_tests.py
index 3e90e9ab4..b3427a2ab 100644
--- a/scripts/run_wine_tests.py
+++ b/scripts/run_wine_tests.py
@@ -161,6 +161,15 @@ def run_test(test: dict, args, wine: list[str]) -> tuple[str, str]:
161 return "fail", "invalid CTest TIMEOUT" 161 return "fail", "invalid CTest TIMEOUT"
162 if ctest_timeout > 0: 162 if ctest_timeout > 0:
163 timeout = min(timeout, ctest_timeout) 163 timeout = min(timeout, ctest_timeout)
164 skip_code = props.get("SKIP_RETURN_CODE")
165 if skip_code is not None:
166 error = "invalid CTest SKIP_RETURN_CODE: expected an integer from 0 to 255"
167 try:
168 skip_code = int(str(skip_code))
169 except ValueError:
170 return "fail", error
171 if not 0 <= skip_code <= 255:
172 return "fail", error
164 start = time.monotonic() 173 start = time.monotonic()
165 try: 174 try:
166 proc = subprocess.run(argv, cwd=cwd, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, 175 proc = subprocess.run(argv, cwd=cwd, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
@@ -177,8 +186,7 @@ def run_test(test: dict, args, wine: list[str]) -> tuple[str, str]:
177 # A negative return code is a host-signal termination (e.g. SIGSEGV), not a process exit code: 186 # A negative return code is a host-signal termination (e.g. SIGSEGV), not a process exit code:
178 # report it as a failure before SKIP_RETURN_CODE or WILL_FAIL can reinterpret it. 187 # report it as a failure before SKIP_RETURN_CODE or WILL_FAIL can reinterpret it.
179 return "fail", f"killed by signal {-code} in {elapsed:.1f} s\n{out}" 188 return "fail", f"killed by signal {-code} in {elapsed:.1f} s\n{out}"
180 skip_code = props.get("SKIP_RETURN_CODE") 189 if code == skip_code:
181 if skip_code is not None and code == int(skip_code):
182 return "skip", f"exit {code} (skip) in {elapsed:.1f} s\n{out}" 190 return "skip", f"exit {code} (skip) in {elapsed:.1f} s\n{out}"
183 detail = f"exit {code} in {elapsed:.1f} s\n{out}" 191 detail = f"exit {code} in {elapsed:.1f} s\n{out}"
184 skip_patterns = regex_list(props.get("SKIP_REGULAR_EXPRESSION", [])) 192 skip_patterns = regex_list(props.get("SKIP_REGULAR_EXPRESSION", []))