Beispiel #1
0
def running_slot(child):
    utils.test_utils_interactive_sync_shell(child, 5, 1)

    child.sendline('current-slot')
    child.expect(r"Running from slot (\d+)\r\n")
    slot = int(child.match.group(1))
    return slot
Beispiel #2
0
def seq_no(child):
    utils.test_utils_interactive_sync_shell(child, 5, 1)
    # get version of currently running image
    # "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
Beispiel #3
0
def app_version(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)
    return app_ver
Beispiel #4
0
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))
    return slot
Beispiel #5
0
 def BEGIN(self):
     utils.test_utils_interactive_sync_shell(self.spawn,
                                             TEST_INTERACTIVE_RETRIES,
                                             TEST_INTERACTIVE_DELAY)
     raise self.CONNECT_FROM_NODE()