golioth / golioth-zephyr-sdk

Golioth SDK For Zephyr
https://www.golioth.io
Apache License 2.0
65 stars 20 forks source link

samples: dfu: pytest: reduce hardcoded global variables #380

Closed mniestroj closed 1 year ago

mniestroj commented 1 year ago

Remove one hardcoded dfu project name in order to be able to quickly move (copy-paste) this test to other directory/sample.

Do not hardcode new firmware version (2.0.0) globally and move it into the test itself. This will allow to develop more DFU tests, that allow to test a flow with multiple rollouts (thus multiple versions).

Introduce a Firmware helper class, which will store both the path and the version of the firmware. Use imgtool package in order to figure out the version automatically from file name (in the context where only a firmware object is passed).

github-actions[bot] commented 1 year ago

Visit the preview URL for this PR (updated for commit 659bfc6):

https://golioth-zephyr-sdk-doxygen-dev--pr380-samples-dfu-pyte-a5vw3nne.web.app

(expires Fri, 12 May 2023 18:42:58 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a389eefadf4b4b68a539327b3459dd66c142cf49