From c1a08451e3a95a957ffadba8a41d51db6cd35333 Mon Sep 17 00:00:00 2001
From: Alexandre Abadie <alexandre.abadie@inria.fr>
Date: Sun, 29 Oct 2017 12:23:44 +0100
Subject: [PATCH] tests/pthread_rwlock: migrate to testrunner script

---
 tests/pthread_rwlock/Makefile        |  3 +++
 tests/pthread_rwlock/tests/01-run.py | 22 ++++++++++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100755 tests/pthread_rwlock/tests/01-run.py

diff --git a/tests/pthread_rwlock/Makefile b/tests/pthread_rwlock/Makefile
index 16f796ed2d..42586a24a8 100644
--- a/tests/pthread_rwlock/Makefile
+++ b/tests/pthread_rwlock/Makefile
@@ -14,3 +14,6 @@ BOARD_INSUFFICIENT_MEMORY += airfy-beacon chronos mbed_lpc1768 msb-430 msb-430h
                              spark-core stm32f0discovery yunjia-nrf51822
 
 include $(RIOTBASE)/Makefile.include
+
+test:
+	tests/01-run.py
diff --git a/tests/pthread_rwlock/tests/01-run.py b/tests/pthread_rwlock/tests/01-run.py
new file mode 100755
index 0000000000..260c449263
--- /dev/null
+++ b/tests/pthread_rwlock/tests/01-run.py
@@ -0,0 +1,22 @@
+#!/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')
+    for _ in range(8):
+        child.expect('start')
+
+    for _ in range(8):
+        child.expect('done')
+
+    child.expect('SUCCESS')
+
+
+if __name__ == "__main__":
+    sys.exit(testrunner.run(testfunc))
-- 
GitLab