Skip to content

Commit c6a0970

Browse files
committed
chore: Remove misleading exit codes from run-tests.py
Suggested-by: firewave <firewave@users.noreply.github.com>
1 parent 632cce2 commit c6a0970

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
@@ -98,15 +98,9 @@ def run(compiler_executable: str, compiler_args: list[str]) -> tuple[int, str, s
9898
"""Execute a compiler command and capture its exit code, stdout, and stderr."""
9999
cmd = [compiler_executable, *compiler_args]
100100

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

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

0 commit comments

Comments
 (0)