Skip to content

Commit 6b3d2e3

Browse files
author
ladyada
committed
timeout the proc.wait
1 parent 00bc76f commit 6b3d2e3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: build_platform.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@
77

88
# optional wall option cause build failed if has warnings
99
BUILD_WALL = False
10+
BUILD_WARN = True
1011
if "--wall" in sys.argv:
1112
BUILD_WALL = True
1213
sys.argv.remove("--wall")
1314

15+
if "--no_warn" in sys.argv:
16+
BUILD_WARN = False
17+
sys.argv.remove("--no_warn")
18+
1419
# add user bin to path!
1520
BUILD_DIR = ''
1621
# add user bin to path!
@@ -253,7 +258,7 @@ def test_examples_in_folder(folderpath):
253258
cmd = ['arduino-cli', 'compile', '--warnings', 'all', '--fqbn', fqbn, examplepath]
254259
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
255260
stderr=subprocess.PIPE)
256-
r = proc.wait()
261+
r = proc.wait(timeout=60)
257262
out = proc.stdout.read()
258263
err = proc.stderr.read()
259264
if r == 0 and not (err and BUILD_WALL == True):

0 commit comments

Comments
 (0)