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:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 11:42:19 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 11:42:19 -0500
commitd5f6eaf6f48d32a607d40acedd41458fb4062ca5 (patch)
treef87c4d441d8a5b5952663c34442a64d32bd7c357 /scripts/run_wine_tests.py
parent733da4f942c5a413f461f8bc220916fc6cd60661 (diff)
parentbdfe5f88ec7f8f061d43f3be897c44bb0b54f668 (diff)
Merge pull request #2154 from Vonsek
Diffstat (limited to 'scripts/run_wine_tests.py')
-rw-r--r--scripts/run_wine_tests.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/run_wine_tests.py b/scripts/run_wine_tests.py
index c46c5bb0b..28c7f2f63 100644
--- a/scripts/run_wine_tests.py
+++ b/scripts/run_wine_tests.py
@@ -138,9 +138,20 @@ def run_test(test: dict, args, wine: list[str]) -> tuple[str, str]:
138 cwd = map_path(cwd, args.windows_root, args.root) if cwd else os.path.dirname(exe) 138 cwd = map_path(cwd, args.windows_root, args.root) if cwd else os.path.dirname(exe)
139 if not cwd or not os.path.isdir(cwd): 139 if not cwd or not os.path.isdir(cwd):
140 cwd = os.path.dirname(exe) 140 cwd = os.path.dirname(exe)
141 assignments = props.get("ENVIRONMENT", [])
142 if not isinstance(assignments, list):
143 return "fail", "invalid CTest ENVIRONMENT: expected a list of NAME=value entries"
144 env = os.environ.copy()
145 for assignment in assignments:
146 if not isinstance(assignment, str):
147 return "fail", "invalid CTest ENVIRONMENT entry: expected NAME=value"
148 key, equals, value = assignment.partition("=")
149 if not key or not equals or "\0" in assignment:
150 return "fail", "invalid CTest ENVIRONMENT entry: expected NAME=value"
151 env[key] = value
141 start = time.monotonic() 152 start = time.monotonic()
142 try: 153 try:
143 proc = subprocess.run(argv, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, 154 proc = subprocess.run(argv, cwd=cwd, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
144 timeout=args.timeout) 155 timeout=args.timeout)
145 except subprocess.TimeoutExpired as e: 156 except subprocess.TimeoutExpired as e:
146 out = (e.stdout or b"").decode("utf-8", "replace") 157 out = (e.stdout or b"").decode("utf-8", "replace")