mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
examples/suit_update/tests: use 'suit seq_no' cmd
This commit is contained in:
parent
ee9bf559fe
commit
c31d0e102d
@ -123,20 +123,19 @@ def get_reachable_addr(child):
|
||||
return "[{}]".format(client_addr)
|
||||
|
||||
|
||||
def app_version(child):
|
||||
def seq_no(child):
|
||||
utils.test_utils_interactive_sync_shell(child, 5, 1)
|
||||
# get version of currently running image
|
||||
# "Image Version: 0x00000000"
|
||||
child.sendline('riotboot-hdr')
|
||||
child.expect(r"Image Version: (?P<app_ver>0x[0-9a-fA-F:]+)\r\n")
|
||||
app_ver = int(child.match.group("app_ver"), 16)
|
||||
# "seq_no: 0x00000000"
|
||||
child.sendline('suit seq_no')
|
||||
child.expect(r"seq_no: (?P<seq_no>0x[0-9a-fA-F:]+)\r\n")
|
||||
app_ver = int(child.match.group("seq_no"), 16)
|
||||
return app_ver
|
||||
|
||||
|
||||
def running_slot(child):
|
||||
utils.test_utils_interactive_sync_shell(child, 5, 1)
|
||||
# get version of currently running image
|
||||
# "Image Version: 0x00000000"
|
||||
|
||||
child.sendline('current-slot')
|
||||
child.expect(r"Running from slot (\d+)\r\n")
|
||||
slot = int(child.match.group(1))
|
||||
@ -191,7 +190,7 @@ def _test_suit_command_is_there(child):
|
||||
|
||||
def testfunc(child):
|
||||
# Get current app_ver
|
||||
current_app_ver = app_version(child)
|
||||
current_app_ver = seq_no(child)
|
||||
# Verify client is reachable and get address
|
||||
client = get_reachable_addr(child)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user