diff --git a/tests/xtimer_mutex_lock_timeout/tests/01-run.py b/tests/xtimer_mutex_lock_timeout/tests/01-run.py index 14170f10dd..dd630eb1aa 100755 --- a/tests/xtimer_mutex_lock_timeout/tests/01-run.py +++ b/tests/xtimer_mutex_lock_timeout/tests/01-run.py @@ -29,14 +29,17 @@ def testfunc(child): child.expect_exact("> ") child.sendline("mutex_timeout_long_locked_low") child.expect("starting test: xtimer mutex lock timeout with thread") - child.expect("threads = 2") + child.expect("threads = (\d+)") + num_threads = int(child.match.group(1)) child.expect("THREAD low prio: start") child.expect("MAIN THREAD: calling xtimer_mutex_lock_timeout") child.expect("OK") - child.expect("threads = 3") + child.expect("threads = (\d+)") + assert int(child.match.group(1)) == num_threads + 1 child.expect("MAIN THREAD: waiting for created thread to end") child.expect("THREAD low prio: exiting low") - child.expect("threads = 2") + child.expect("threads = (\d+)") + assert int(child.match.group(1)) == num_threads child.expect_exact("> ") child.sendline("mutex_timeout_short_locked") child.expect("starting test: xtimer mutex lock timeout with short timeout and locked mutex")