Skip to content

Commit 2a310b3

Browse files
committed
chore: Remove misleading exit codes from run-tests.py
Suggested-by: Oliver Stöneberg <firewave@users.noreply.github.com>
1 parent 8d9228d commit 2a310b3

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

run-tests.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,9 @@ def run(compiler_executable: str, compiler_args: list[str]) -> tuple[int, str, s
9999
compiler_cmd = [compiler_executable]
100100
compiler_cmd.extend(compiler_args)
101101

102-
try:
103-
with subprocess.Popen(compiler_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, encoding="utf-8") as process:
104-
stdout, stderr = process.communicate()
105-
exit_code = process.returncode
106-
except FileNotFoundError as e:
107-
# Compiler not found
108-
return (127, "", f"{e}")
109-
except Exception as e:
110-
return (1, "", f"{e}")
102+
with subprocess.Popen(compiler_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, encoding="utf-8") as process:
103+
stdout, stderr = process.communicate()
104+
exit_code = process.returncode
111105

112106
output = cleanup(stdout)
113107
error = (stderr or "").strip()

0 commit comments

Comments
 (0)