tests/shell: check for shell prompt

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

View File

@ -57,9 +57,12 @@ CMDS = (
('reboot', ('test_shell.'))
)
PROMPT = '> '
BOARD = os.environ['BOARD']
def check_cmd(child, cmd, expected):
child.expect(PROMPT)
child.sendline(cmd)
for line in expected:
child.expect_exact(line)