diff --git a/tests/pthread_condition_variable/Makefile b/tests/pthread_condition_variable/Makefile index d56deac6d0729f4060eb66f632d121358d803eb7..2a0df7095de41122330c379b8e58e5f446a88e97 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 0000000000000000000000000000000000000000..a88053e6fbeb2c40fa76bbb761253e72f9b95584 --- /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))