[riot-notifications] [RIOT-OS/RIOT] tests/riotboot: make automatic script work with cc2538-bsl (#15446)

Alexandre Abadie notifications at github.com
Tue Nov 17 16:58:06 CET 2020

@aabadie 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)

This is what I was suspecting but this is far from obvious and this why I was initially asking for an explanation (a comment).

Instead of the global keyword, you could maybe wrap things in a class with 2 attributes current_app_ver and current_slot_num. The class would have methods to check the current slot/app version and to perform the test. I think that would be cleaner.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201117/ce223fd1/attachment-0001.htm>

More information about the notifications mailing list