1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-19 11:33:51 +01:00
RIOT/tests/pthread/tests/01-run.py
smlng 3893f04d00 tests: move testrunner import up
Testrunner is now impported as a package found in PYTHONPATH, so
import can be placed at the top of the script as usual.
2018-08-13 14:11:24 +02:00

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))