Skip to content

Commit 0d2278b

Browse files
rsoracmaglie
rsora
authored andcommitted
Refine upload flags testing
1 parent 5cc9a30 commit 0d2278b

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

Diff for: test/test_upload.py

+14-6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# software without disclosing the source code of your own applications. To purchase
1414
# a commercial license, send an email to [email protected].
1515
import os
16+
import time
1617

1718
import pytest
1819

@@ -45,16 +46,23 @@ def test_upload(run_command, data_dir, detected_boards):
4546
)
4647
)
4748

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
4952
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(":", ".")
5256
)
5357
)
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
5562
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(":", ".")
5866
)
5967
)
6068

0 commit comments

Comments
 (0)