From e87314fa1e63bcb1d3e32bc2509b6b27ce4bebc0 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Sun, 29 Oct 2017 11:37:12 +0100 Subject: [PATCH] tests/pthread_condition_variable: migrate to testrunner script --- tests/pthread_condition_variable/Makefile | 3 +++ .../tests/01-run.py | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100755 tests/pthread_condition_variable/tests/01-run.py diff --git a/tests/pthread_condition_variable/Makefile b/tests/pthread_condition_variable/Makefile index d56deac6d0..2a0df7095d 100644 --- a/tests/pthread_condition_variable/Makefile +++ b/tests/pthread_condition_variable/Makefile @@ -13,3 +13,6 @@ USEMODULE += xtimer CFLAGS += -DNATIVE_AUTO_EXIT include $(RIOTBASE)/Makefile.include + +test: + tests/01-run.py diff --git a/tests/pthread_condition_variable/tests/01-run.py b/tests/pthread_condition_variable/tests/01-run.py new file mode 100755 index 0000000000..a88053e6fb --- /dev/null +++ b/tests/pthread_condition_variable/tests/01-run.py @@ -0,0 +1,19 @@ +#!/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') + child.expect('condition fulfilled.') + child.expect('SUCCESS') + + +if __name__ == "__main__": + # This test can take some time to complete when testing on hardware (e.g + # on samr21-xpro) and the default timeout (10s) is not enough. + sys.exit(testrunner.run(testfunc, timeout=60))