Skip to content

Commit 3907bae

Browse files
authored
Merge pull request espressif#110 from adafruit/fix-proc-timeout
Fix proc timeout
2 parents 6b10fd6 + c173d84 commit 3907bae

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

actions_install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ mkdir ${HOME}/Arduino/libraries
1818

1919
# install arduino IDE
2020
export PATH=$PATH:$GITHUB_WORKSPACE/bin
21-
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh -s 0.18.3 2>&1
21+
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
2222
arduino-cli config init > /dev/null
2323
arduino-cli core update-index > /dev/null

build_platform.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -335,13 +335,14 @@ def test_examples_in_folder(folderpath):
335335

336336
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
337337
stderr=subprocess.PIPE)
338-
r = proc.wait(timeout=60)
339-
out = proc.stdout.read()
340-
err = proc.stderr.read()
341-
#print(cmd)
342-
#print(r)
343-
#ColorPrint.print_info(out.decode("utf-8"))
344-
#ColorPrint.print_info(err.decode("utf-8"))
338+
try:
339+
out, err = proc.communicate(timeout=60)
340+
r = proc.returncode
341+
except:
342+
proc.kill()
343+
out, err = proc.communicate()
344+
r = 1
345+
345346
if r == 0 and not (err and BUILD_WALL == True):
346347
ColorPrint.print_pass(CHECK)
347348
if err:

0 commit comments

Comments
 (0)