mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2026-01-01 01:41:18 +01:00
Testrunner is now impported as a package found in PYTHONPATH, so import can be placed at the top of the script as usual.
32 lines
1.2 KiB
Python
Executable File
32 lines
1.2 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("SUCCESS")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(run(testfunc))
|