|
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 |
|
@@ -53,16 +54,23 @@ def test_upload(run_command, data_dir, detected_boards):
|
53 | 54 | )
|
54 | 55 | )
|
55 | 56 |
|
56 |
| - # Upload using --input-dir |
| 57 | + # multiple uploads requires some pauses |
| 58 | + time.sleep(2) |
| 59 | + # Upload using --input-dir reusing standard sketch "build" folder artifacts |
57 | 60 | assert run_command(
|
58 |
| - "upload -b {fqbn} -p {port} --input-dir {sketch_path}/build/{fqbn}".format( |
59 |
| - sketch_path=sketch_path, fqbn=board.fqbn, port=board.address, sketch_name=sketch_name |
| 61 | + "upload -b {fqbn} -p {port} --input-dir {sketch_path}/build/{fqbn_path} {sketch_path}".format( |
| 62 | + sketch_path=sketch_path, fqbn=board.fqbn, port=board.address, |
| 63 | + fqbn_path=board.fqbn.replace(":", ".") |
60 | 64 | )
|
61 | 65 | )
|
62 |
| - # Upload using --input-file |
| 66 | + |
| 67 | + # multiple uploads requires some pauses |
| 68 | + time.sleep(2) |
| 69 | + # Upload using --input-file reusing standard sketch "build" folder artifacts |
63 | 70 | assert run_command(
|
64 |
| - "upload -b {fqbn} -p {port} --input-dir {sketch_path}/build/{fqbn}/{sketch_name}.ino.bin".format( |
65 |
| - sketch_path=sketch_path, fqbn=board.fqbn, port=board.address, sketch_name=sketch_name |
| 71 | + "upload -b {fqbn} -p {port} --input-file {sketch_path}/build/{fqbn_path}/{sketch_name}.ino.bin".format( |
| 72 | + sketch_path=sketch_path, fqbn=board.fqbn, port=board.address, sketch_name=sketch_name, |
| 73 | + fqbn_path=board.fqbn.replace(":", ".") |
66 | 74 | )
|
67 | 75 | )
|
68 | 76 |
|
|
0 commit comments