From 0ccf94fa2389e4e0083cbbc4e07b77a942dff474 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Tue, 23 Jun 2020 13:37:47 +0200 Subject: [PATCH] tests/shell: don't expect idle thread in ps output --- tests/shell/tests/01-run.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/shell/tests/01-run.py b/tests/shell/tests/01-run.py index ecd4f43b92..d64e3c7958 100755 --- a/tests/shell/tests/01-run.py +++ b/tests/shell/tests/01-run.py @@ -24,8 +24,7 @@ EXPECTED_HELP = ( EXPECTED_PS = ( '\tpid | state Q | pri', - '\t 1 | pending Q | 15', - '\t 2 | running Q | 7' + '\t \d | running Q | 7' ) # In native we are directly executing the binary (no terminal program). We must @@ -102,6 +101,8 @@ CMDS = ( ('end_test', '[TEST_END]'), ) +CMDS_REGEX = {'ps'} + BOARD = os.environ['BOARD'] @@ -112,10 +113,14 @@ def print_error(message): def check_cmd(child, cmd, expected): + regex = cmd in CMDS_REGEX child.expect(PROMPT) child.sendline(cmd) for line in expected: - child.expect_exact(line) + if regex: + child.expect(line) + else: + child.expect_exact(line) def check_startup(child):