tests/pthread_cooperation: migrate to testrunner script

This commit is contained in:
Alexandre Abadie 2017-10-29 11:50:25 +01:00
parent 633be9a87b
commit 67187e240f
2 changed files with 26 additions and 0 deletions

View File

@ -10,3 +10,6 @@ USEMODULE += posix
USEMODULE += pthread USEMODULE += pthread
include $(RIOTBASE)/Makefile.include include $(RIOTBASE)/Makefile.include
test:
tests/01-run.py

View File

@ -0,0 +1,23 @@
#!/usr/bin/env python3
import os
import sys
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
import testrunner
def testfunc(child):
child.expect('START')
for i in range(12):
child.expect('Creating thread with arg {}'.format(i + 1))
for i in range(12):
child.expect('join thread {}'.format(i + 1))
child.expect('SUCCESS')
if __name__ == "__main__":
sys.exit(testrunner.run(testfunc))