Skip to content

Commit 6ff9f70

Browse files
committed
always build with all warnings, only failed with --wall option
1 parent e8902dd commit 6ff9f70

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

build_platform.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
import subprocess
66
import collections
77

8-
# optional wall option
9-
BUILD_WARNING = 'default'
8+
# optional wall option cause build failed if has warnings
9+
BUILD_WALL = False
1010
if "--wall" in sys.argv:
11-
BUILD_WARNING = 'all'
11+
BUILD_WALL = True
1212
sys.argv.remove("--wall")
1313

1414
# add user bin to path!
@@ -231,13 +231,13 @@ def test_examples_in_folder(folderpath):
231231
ColorPrint.print_warn("skipping")
232232
continue
233233

234-
cmd = ['arduino-cli', 'compile', '--warnings', BUILD_WARNING, '--fqbn', fqbn, examplepath]
234+
cmd = ['arduino-cli', 'compile', '--warnings', 'all', '--fqbn', fqbn, examplepath]
235235
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
236236
stderr=subprocess.PIPE)
237237
r = proc.wait()
238238
out = proc.stdout.read()
239239
err = proc.stderr.read()
240-
if r == 0:
240+
if r == 0 and not (err and BUILD_WALL == True):
241241
ColorPrint.print_pass(CHECK)
242242
if err:
243243
# also print out warning message
@@ -257,7 +257,7 @@ def test_examples_in_learningrepo(folderpath):
257257
continue
258258
if not projectpath.endswith(".ino"):
259259
continue
260-
# found an INO!
260+
# found an INO!
261261
print('\t'+projectpath, end=' ')
262262
# check if we should SKIP
263263
skipfilename = folderpath+"/."+platform+".test.skip"
@@ -269,7 +269,7 @@ def test_examples_in_learningrepo(folderpath):
269269
ColorPrint.print_warn("skipping")
270270
continue
271271

272-
cmd = ['arduino-cli', 'compile', '--warnings', BUILD_WARNING, '--fqbn', fqbn, projectpath]
272+
cmd = ['arduino-cli', 'compile', '--warnings', 'all', '--fqbn', fqbn, projectpath]
273273
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
274274
stderr=subprocess.PIPE)
275275
r = proc.wait()

0 commit comments

Comments
 (0)