mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-19 11:33:51 +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.
22 lines
537 B
Python
Executable File
22 lines
537 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
import math
|
|
from testrunner import run
|
|
|
|
FACTORIAL_PARAM = 6
|
|
|
|
|
|
def testfunc(child):
|
|
child.expect('main: parameter = {}'.format(FACTORIAL_PARAM))
|
|
child.expect('pthread: parameter = {}'.format(FACTORIAL_PARAM))
|
|
child.expect('pthread: factorial = {}'
|
|
.format(math.factorial(FACTORIAL_PARAM)))
|
|
child.expect('main: factorial = {}'
|
|
.format(math.factorial(FACTORIAL_PARAM)))
|
|
child.expect('SUCCESS')
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(run(testfunc))
|