tests: thread_cooperation add testrunner script
This commit is contained in:
parent
1d432a0e7d
commit
ccad1acb28
@ -22,4 +22,7 @@ PROBLEM ?= 12
|
|||||||
|
|
||||||
CFLAGS += -DPROBLEM=$(PROBLEM)
|
CFLAGS += -DPROBLEM=$(PROBLEM)
|
||||||
|
|
||||||
|
test:
|
||||||
|
./tests/01-run.py
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.include
|
include $(RIOTBASE)/Makefile.include
|
||||||
|
|||||||
22
tests/thread_cooperation/tests/01-run.py
Executable file
22
tests/thread_cooperation/tests/01-run.py
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
# Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de>
|
||||||
|
# Copyright (C) 2017 HAW Hamburg
|
||||||
|
#
|
||||||
|
# This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
# directory for more details.
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
|
||||||
|
import testrunner
|
||||||
|
|
||||||
|
def testfunc(child):
|
||||||
|
child.expect(r"MAIN: reply from T-\d+")
|
||||||
|
child.expect(r"MAIN: \d+! = \d+")
|
||||||
|
child.expect_exact("[SUCCESS]")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(testrunner.run(testfunc))
|
||||||
Loading…
x
Reference in New Issue
Block a user