mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/xtimer_mutex_lock_timeout: clean python automated test
This commit is contained in:
parent
dd13e5c639
commit
58de8b39f6
@ -20,34 +20,34 @@ def testfunc(child):
|
||||
if child.expect_exact(["> ", pexpect.TIMEOUT], timeout=1) == 0:
|
||||
break
|
||||
child.sendline("mutex_timeout_long_unlocked")
|
||||
child.expect("starting test: xtimer mutex lock timeout")
|
||||
child.expect("OK")
|
||||
child.expect_exact("starting test: xtimer mutex lock timeout")
|
||||
child.expect_exact("OK")
|
||||
child.expect_exact("> ")
|
||||
child.sendline("mutex_timeout_long_locked")
|
||||
child.expect("starting test: xtimer mutex lock timeout")
|
||||
child.expect("OK")
|
||||
child.expect_exact("starting test: xtimer mutex lock timeout")
|
||||
child.expect_exact("OK")
|
||||
child.expect_exact("> ")
|
||||
child.sendline("mutex_timeout_long_locked_low")
|
||||
child.expect("starting test: xtimer mutex lock timeout with thread")
|
||||
child.expect("threads = (\d+)")
|
||||
child.expect_exact("starting test: xtimer mutex lock timeout with thread")
|
||||
child.expect(r"threads = (\d+)\r\n")
|
||||
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 = (\d+)")
|
||||
child.expect_exact("THREAD low prio: start")
|
||||
child.expect_exact("MAIN THREAD: calling xtimer_mutex_lock_timeout")
|
||||
child.expect_exact("OK")
|
||||
child.expect(r"threads = (\d+)\r\n")
|
||||
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 = (\d+)")
|
||||
child.expect_exact("MAIN THREAD: waiting for created thread to end")
|
||||
child.expect_exact("THREAD low prio: exiting low")
|
||||
child.expect(r"threads = (\d+)\r\n")
|
||||
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")
|
||||
child.expect("OK")
|
||||
child.expect_exact("starting test: xtimer mutex lock timeout with short timeout and locked mutex")
|
||||
child.expect_exact("OK")
|
||||
child.expect_exact("> ")
|
||||
child.sendline("mutex_timeout_short_unlocked")
|
||||
child.expect("starting test: xtimer mutex lock timeout with short timeout and unlocked mutex")
|
||||
child.expect("OK")
|
||||
child.expect_exact("starting test: xtimer mutex lock timeout with short timeout and unlocked mutex")
|
||||
child.expect_exact("OK")
|
||||
child.expect_exact("> ")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user