Skip to content

Commit c1745eb

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

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

run-tests.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,9 @@ def run(compiler_executable: str, compiler_args: List[str]) -> Tuple[int, str, s
107107
"""Execute a compiler command and capture its exit code, stdout, and stderr."""
108108
cmd = [compiler_executable, *compiler_args]
109109

110-
try:
111-
with subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, encoding="utf-8") as process:
112-
stdout, stderr = process.communicate()
113-
exit_code = process.returncode
114-
except FileNotFoundError as e:
115-
# Compiler not found
116-
return (127, "", f"{e}")
117-
except Exception as e:
118-
return (1, "", f"{e}")
110+
with subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, encoding="utf-8") as process:
111+
stdout, stderr = process.communicate()
112+
exit_code = process.returncode
119113

120114
output = cleanup(stdout)
121115
error = (stderr or "").strip()

0 commit comments

Comments
 (0)