|
13 | 13 | # software without disclosing the source code of your own applications. To purchase |
14 | 14 | # a commercial license, send an email to license@arduino.cc. |
15 | 15 | import os |
| 16 | +import time |
16 | 17 |
|
17 | 18 | import pytest |
18 | 19 |
|
@@ -45,16 +46,23 @@ def test_upload(run_command, data_dir, detected_boards): |
45 | 46 | ) |
46 | 47 | ) |
47 | 48 |
|
48 | | - # Upload using --input-dir |
| 49 | + # multiple uploads requires some pauses |
| 50 | + time.sleep(2) |
| 51 | + # Upload using --input-dir reusing standard sketch "build" folder artifacts |
49 | 52 | assert run_command( |
50 | | - "upload -b {fqbn} -p {port} --input-dir {sketch_path}/build/{fqbn}".format( |
51 | | - sketch_path=sketch_path, fqbn=board.fqbn, port=board.address, sketch_name=sketch_name |
| 53 | + "upload -b {fqbn} -p {port} --input-dir {sketch_path}/build/{fqbn_path} {sketch_path}".format( |
| 54 | + sketch_path=sketch_path, fqbn=board.fqbn, port=board.address, |
| 55 | + fqbn_path=board.fqbn.replace(":", ".") |
52 | 56 | ) |
53 | 57 | ) |
54 | | - # Upload using --input-file |
| 58 | + |
| 59 | + # multiple uploads requires some pauses |
| 60 | + time.sleep(2) |
| 61 | + # Upload using --input-file reusing standard sketch "build" folder artifacts |
55 | 62 | assert run_command( |
56 | | - "upload -b {fqbn} -p {port} --input-dir {sketch_path}/build/{fqbn}/{sketch_name}.ino.bin".format( |
57 | | - sketch_path=sketch_path, fqbn=board.fqbn, port=board.address, sketch_name=sketch_name |
| 63 | + "upload -b {fqbn} -p {port} --input-file {sketch_path}/build/{fqbn_path}/{sketch_name}.ino.bin".format( |
| 64 | + sketch_path=sketch_path, fqbn=board.fqbn, port=board.address, sketch_name=sketch_name, |
| 65 | + fqbn_path=board.fqbn.replace(":", ".") |
58 | 66 | ) |
59 | 67 | ) |
60 | 68 |
|
|
0 commit comments