tests/shell: don't expect idle thread in ps output

This commit is contained in:
Kaspar Schleiser 2020-06-23 13:37:47 +02:00
parent 3af04d0da8
commit 0ccf94fa23

View File

@ -24,8 +24,7 @@ EXPECTED_HELP = (
EXPECTED_PS = ( EXPECTED_PS = (
'\tpid | state Q | pri', '\tpid | state Q | pri',
'\t 1 | pending Q | 15', '\t \d | running Q | 7'
'\t 2 | running Q | 7'
) )
# In native we are directly executing the binary (no terminal program). We must # In native we are directly executing the binary (no terminal program). We must
@ -102,6 +101,8 @@ CMDS = (
('end_test', '[TEST_END]'), ('end_test', '[TEST_END]'),
) )
CMDS_REGEX = {'ps'}
BOARD = os.environ['BOARD'] BOARD = os.environ['BOARD']
@ -112,10 +113,14 @@ def print_error(message):
def check_cmd(child, cmd, expected): def check_cmd(child, cmd, expected):
regex = cmd in CMDS_REGEX
child.expect(PROMPT) child.expect(PROMPT)
child.sendline(cmd) child.sendline(cmd)
for line in expected: for line in expected:
child.expect_exact(line) if regex:
child.expect(line)
else:
child.expect_exact(line)
def check_startup(child): def check_startup(child):