From bc03a0d1502570e81c008cda58272dad36722706 Mon Sep 17 00:00:00 2001
From: Alexandre Abadie <alexandre.abadie@inria.fr>
Date: Sat, 11 Nov 2017 23:14:57 +0100
Subject: [PATCH] tests/libfixmath_unittests: migrate to testrunner

---
 tests/libfixmath_unittests/Makefile        |  3 +++
 tests/libfixmath_unittests/main.c          |  2 +-
 tests/libfixmath_unittests/tests/01-run.py | 20 ++++++++++++++++++++
 3 files changed, 24 insertions(+), 1 deletion(-)
 create mode 100755 tests/libfixmath_unittests/tests/01-run.py

diff --git a/tests/libfixmath_unittests/Makefile b/tests/libfixmath_unittests/Makefile
index 64f3094745..49d7663002 100644
--- a/tests/libfixmath_unittests/Makefile
+++ b/tests/libfixmath_unittests/Makefile
@@ -17,3 +17,6 @@ ifneq (,$(filter native qemu-i386,$(BOARD)))
 endif
 
 include $(RIOTBASE)/Makefile.include
+
+test:
+	tests/01-run.py
diff --git a/tests/libfixmath_unittests/main.c b/tests/libfixmath_unittests/main.c
index c0843f2c49..d401275d7f 100644
--- a/tests/libfixmath_unittests/main.c
+++ b/tests/libfixmath_unittests/main.c
@@ -40,6 +40,6 @@ int main(void)
     RUN(fix16_str_unittests);
     RUN(fix16_unittests);
 
-    puts("All tests executed.");
+    puts("SUCCESS");
     return 0;
 }
diff --git a/tests/libfixmath_unittests/tests/01-run.py b/tests/libfixmath_unittests/tests/01-run.py
new file mode 100755
index 0000000000..0a1cecc7d2
--- /dev/null
+++ b/tests/libfixmath_unittests/tests/01-run.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+
+# Copyright (C) 2017 Inria
+#
+# 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('SUCCESS')
+
+if __name__ == "__main__":
+    sys.exit(testrunner.run(testfunc))
-- 
GitLab