[riot-notifications] [RIOT-OS/RIOT] tests/riotboot: make automatic script work with cc2538-bsl (#15446)
Francisco
notifications at github.com
Mon Nov 16 13:39:49 CET 2020
@fjmolinas commented on this pull request.
>
if __name__ == "__main__":
- sys.exit(run(testfunc))
+ res = 1
+ global current_app_ver
+ global current_slot_num
+ # set current slot number and app version
+ res = run(testcurrent)
Well I'm not very good at this, and so It is indeed dirty, but I'm under the impression that `run()` only returns an exit code, so either `1` or `0` from what I see in code.
What I need to to is `detach` the terminal before flashing because the `cc2538-bsl` script flashes over serial and therefore I can't have the terminal open when flashing.
`run(testfunc)` among others spawns a terminal and the terminal remains attached until `testfunc` exits. And so to be able to flash to `slot0` and `slot1` I need to be able to do the following:
- attach terminal
- get current slot and app version
- detach terminal
- flash to the other slot with newer app version
- attach terminal
- check everything is OK
- detach terminal
- flash to the other slot with newer app version
- attach terminal
- check everything is OK
- test passed
Having multiple `run(testfunc)` allows handling proper attaching/detaching every time
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15446#discussion_r524230362
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201116/633e1353/attachment.htm>
More information about the notifications
mailing list