1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/tests/thread_flags/tests/01-run.py
2020-02-13 15:37:30 +01:00

34 lines
1.4 KiB
Python
Executable File

#!/usr/bin/env python3
import sys
from testrunner import run
def testfunc(child):
child.expect("START")
child.expect_exact("thread(): waiting for 0x1...")
child.expect_exact("main(): setting flag 0x0001")
child.expect_exact("thread(): received flags: 0x0001")
child.expect_exact("thread(): waiting for 0x1 || 0x64...")
child.expect_exact("main(): setting flag 0x0064")
child.expect_exact("thread(): received flags: 0x0064")
child.expect_exact("thread(): waiting for 0x2 && 0x4...")
child.expect_exact("main(): setting flag 0x0001")
child.expect_exact("main(): setting flag 0x0008")
child.expect_exact("main(): setting flag 0x0002")
child.expect_exact("main(): setting flag 0x0004")
child.expect_exact("thread(): received flags: 0x0006")
child.expect_exact("thread(): waiting for any flag, one by one")
child.expect_exact("thread(): received flags: 0x0001")
child.expect_exact("thread(): waiting for any flag, one by one")
child.expect_exact("thread(): received flags: 0x0008")
child.expect_exact("main: setting 100ms timeout...")
child.expect("main: timeout triggered. time passed: [0-9]{6}us")
child.expect_exact("main: setting 100ms timeout (using uint64)...")
child.expect("main: timeout triggered. time passed: [0-9]{6}us")
child.expect("SUCCESS")
if __name__ == "__main__":
sys.exit(run(testfunc))