tests: thread_cooperation add testrunner script

This commit is contained in:
smlng 2017-10-25 14:35:03 +02:00
parent 1d432a0e7d
commit ccad1acb28
2 changed files with 25 additions and 0 deletions

View File

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

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