Refactored upload procedure to correctly handle bootloader.tool property #952
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously the
bootloader.tool
property was ignored (due to how the sequence ofif
was structured in therunProgramAction
).I see that on the majority of platforms this was not a problem (because
bootloader.tool
almost always equals toprogram.tool
), but this needs to be fixed anyway.I've also added a bunch of tests using a fake platform defined in
commands/upload/testdata/hardware/alice/avr/
that runs theecho
tool, so we can capture the upload output. The last test checks the most complex case that it's fixed by this PR.TDB: I'd like to add also tests for "referenced platforms", the idea is to create another platform in
commands/upload/testdata/hardware/bob/avr/
that refers to the first one and use it to test as many combinations of configurations as possible and see if the "properties composition" works correctly.