diff --git a/tests/thread_cooperation/Makefile b/tests/thread_cooperation/Makefile index d07085a50a..2dccd1a62b 100644 --- a/tests/thread_cooperation/Makefile +++ b/tests/thread_cooperation/Makefile @@ -22,4 +22,7 @@ PROBLEM ?= 12 CFLAGS += -DPROBLEM=$(PROBLEM) +test: + ./tests/01-run.py + include $(RIOTBASE)/Makefile.include diff --git a/tests/thread_cooperation/tests/01-run.py b/tests/thread_cooperation/tests/01-run.py new file mode 100755 index 0000000000..4876418231 --- /dev/null +++ b/tests/thread_cooperation/tests/01-run.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 + +# Copyright (C) 2016 Kaspar Schleiser +# 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))