Skip to content
Snippets Groups Projects
Commit 7c446176 authored by Alexandre Abadie's avatar Alexandre Abadie
Browse files

tests/pthread: migrate to testrunner script

parent cc90f8a8
No related branches found
No related tags found
No related merge requests found
...@@ -8,3 +8,6 @@ USEMODULE += posix ...@@ -8,3 +8,6 @@ USEMODULE += posix
USEMODULE += pthread USEMODULE += pthread
include $(RIOTBASE)/Makefile.include include $(RIOTBASE)/Makefile.include
test:
tests/01-run.py
#!/usr/bin/env python3
import os
import sys
import math
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
import testrunner
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(testrunner.run(testfunc))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment