Skip to content

Commit 96dab00

Browse files
Let retry decorator handle echion process crashes on macOS
1 parent 95c4801 commit 96dab00

1 file changed

Lines changed: 13 additions & 15 deletions

File tree

tests/utils.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from itertools import count
88
from pathlib import Path
99
from shutil import which
10-
from subprocess import PIPE, CalledProcessError, CompletedProcess, Popen, run
10+
from subprocess import PIPE, CompletedProcess, Popen, run
1111
from time import sleep
1212

1313
import pytest
@@ -175,20 +175,18 @@ def assert_not_substack(
175175

176176

177177
def run_echion(*args: str) -> CompletedProcess:
178-
try:
179-
return run(
180-
[
181-
"echion",
182-
*args,
183-
],
184-
capture_output=True,
185-
check=True,
186-
timeout=30,
187-
)
188-
except CalledProcessError as e:
189-
print(e.stdout.decode())
190-
print(e.stderr.decode())
191-
raise
178+
result = run(
179+
[
180+
"echion",
181+
*args,
182+
],
183+
capture_output=True,
184+
timeout=30,
185+
)
186+
if result.returncode != 0:
187+
print(result.stdout.decode())
188+
print(result.stderr.decode())
189+
return result
192190

193191

194192
def run_target(

0 commit comments

Comments
 (0)