From ac8a6cf3a30df10dca537e0db5329f72879c7f16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Mon, 12 Aug 2019 16:42:21 +0200 Subject: [PATCH] tests/libfixmath: use test_utils_interactive_sync Replace the 'xtimer_sleep' hack to prevent flooding at startup to use test_utils_interactive_sync for synchronizing. --- tests/libfixmath/Makefile | 2 +- tests/libfixmath/main.c | 7 ++++--- tests/libfixmath/tests/01-run.py | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/libfixmath/Makefile b/tests/libfixmath/Makefile index ce035be05c..4fa74dcc92 100644 --- a/tests/libfixmath/Makefile +++ b/tests/libfixmath/Makefile @@ -2,7 +2,7 @@ include ../Makefile.tests_common USEPKG += libfixmath USEMODULE += libfixmath -USEMODULE += xtimer +USEMODULE += test_utils_interactive_sync TEST_ON_CI_WHITELIST += all diff --git a/tests/libfixmath/main.c b/tests/libfixmath/main.c index 52f12f530c..48094637e1 100644 --- a/tests/libfixmath/main.c +++ b/tests/libfixmath/main.c @@ -31,8 +31,8 @@ #include #include "kernel_defines.h" -#include "xtimer.h" #include "fix16.h" +#include "test_utils/interactive_sync.h" #ifndef M_PI # define M_PI 3.14159265359 @@ -186,8 +186,9 @@ static void unary_ops(void) int main(void) { - /* Delay output to prevent flooding of buffer */ - xtimer_sleep(1); + /* Sync to prevent flooding of buffer */ + test_utils_interactive_sync(); + puts("Unary."); unary_ops(); diff --git a/tests/libfixmath/tests/01-run.py b/tests/libfixmath/tests/01-run.py index 29213751f7..21e42d95fa 100755 --- a/tests/libfixmath/tests/01-run.py +++ b/tests/libfixmath/tests/01-run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import sys -from testrunner import run +from testrunner import run, test_utils_interactive_sync def expect_unary(child): @@ -31,6 +31,7 @@ def expect_binary(child): def testfunc(child): + test_utils_interactive_sync(child) child.expect_exact('Unary.') expect_unary(child) child.expect_exact('Binary.')