Skip to content

Commit 445b62e

Browse files
committed
debugging
1 parent f3abb4e commit 445b62e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

build_platform.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,14 @@ def generate_uf2(example_path):
265265
r = proc.wait(timeout=60)
266266
out = proc.stdout.read()
267267
err = proc.stderr.read()
268-
if r == 0 and not err:
268+
if r == 0: # and not err: # we might get warnings that do not affect the result
269269
ColorPrint.print_pass(CHECK)
270270
ColorPrint.print_info(out.decode("utf-8"))
271271
else:
272272
ColorPrint.print_fail(CROSS)
273-
ColorPrint.print_fail(out.decode("utf-8"))
274-
ColorPrint.print_fail(err.decode("utf-8"))
273+
ColorPrint.print_fail("\n\rERRCODE:", str(r))
274+
ColorPrint.print_fail("\n\rOUTPUT: ", out.decode("utf-8"))
275+
ColorPrint.print_fail("\n\rERROR: ", err.decode("utf-8"))
275276
return None
276277
return output_file
277278

@@ -309,6 +310,7 @@ def test_examples_in_folder(folderpath):
309310
global success
310311
for example in sorted(os.listdir(folderpath)):
311312
examplepath = folderpath+"/"+example
313+
ColorPrint.print_info(folderpath, examplepath)
312314
if os.path.isdir(examplepath):
313315
test_examples_in_folder(examplepath)
314316
continue
@@ -358,6 +360,9 @@ def test_examples_in_folder(folderpath):
358360
out, err = proc.communicate()
359361
r = 1
360362

363+
os.system("ls -lR "+BUILD_DIR+"/build")
364+
os.system("ls -lR "+folderpath)
365+
361366
if r == 0 and not (err and BUILD_WALL == True):
362367
ColorPrint.print_pass(CHECK)
363368
if err:
@@ -373,6 +378,7 @@ def test_examples_in_folder(folderpath):
373378
if filename is None:
374379
success = 1 # failure
375380
if IS_LEARNING_SYS:
381+
ColorPrint.print_info(filename.split, filename.split("/"))
376382
fqbnpath, uf2file = filename.split("/")[-2:]
377383
os.makedirs(BUILD_DIR+"/build", exist_ok=True)
378384
os.makedirs(BUILD_DIR+"/build/"+fqbnpath, exist_ok=True)

0 commit comments

Comments
 (0)