tests/shell: check for startup message

Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
This commit is contained in:
Hendrik van Essen 2020-02-07 13:02:04 +01:00 committed by Francisco Molina
parent 393eadcfb9
commit 32d7c9b6b8
No known key found for this signature in database
GPG Key ID: 3E94EAC3DBDEEDA8

View File

@ -65,6 +65,11 @@ def check_cmd(child, cmd, expected):
child.expect_exact(line) child.expect_exact(line)
def check_startup(child):
child.sendline(CONTROL_C)
child.expect_exact(PROMPT)
def check_and_get_bufsize(child): def check_and_get_bufsize(child):
child.sendline('bufsize') child.sendline('bufsize')
child.expect('([0-9]+)\r\n') child.expect('([0-9]+)\r\n')
@ -78,6 +83,8 @@ def testfunc(child):
if BOARD == 'native': if BOARD == 'native':
child.crlf = '\n' child.crlf = '\n'
check_startup(child)
bufsize = check_and_get_bufsize(child) bufsize = check_and_get_bufsize(child)
# loop other defined commands and expected output # loop other defined commands and expected output