diff --git a/build_platform.py b/build_platform.py index b6b99f9d..50692bf4 100644 --- a/build_platform.py +++ b/build_platform.py @@ -168,6 +168,8 @@ def install_platform(platform): ColorPrint.print_fail("FAILED to install "+platform) exit(-1) ColorPrint.print_pass(CHECK) + # print installed core version + print(os.popen('arduino-cli core list | grep {}'.format(platform)).read(), end='') def run_or_die(cmd, error): print(cmd) @@ -311,12 +313,12 @@ def test_examples_in_folder(folderpath): if BUILD_WARN: if os.path.exists(gen_file_name): - cmd = ['arduino-cli', 'compile', '--warnings', 'all', '--fqbn', fqbn, '-e', examplepath] + cmd = ['arduino-cli', 'compile', '--warnings', 'all', '--fqbn', fqbn, '-e', folderpath] else: - cmd = ['arduino-cli', 'compile', '--warnings', 'all', '--fqbn', fqbn, examplepath] + cmd = ['arduino-cli', 'compile', '--warnings', 'all', '--fqbn', fqbn, folderpath] else: - cmd = ['arduino-cli', 'compile', '--warnings', 'none', '--export-binaries', '--fqbn', fqbn, examplepath] - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, + cmd = ['arduino-cli', 'compile', '--warnings', 'none', '--export-binaries', '--fqbn', fqbn, folderpath] + proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) r = proc.wait(timeout=60) out = proc.stdout.read()