1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-26 15:03:53 +01:00

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.
This commit is contained in:
Gaëtan Harter 2019-08-12 16:42:21 +02:00
parent 4c209ab8d7
commit ac8a6cf3a3
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B
3 changed files with 7 additions and 5 deletions

View File

@ -2,7 +2,7 @@ include ../Makefile.tests_common
USEPKG += libfixmath
USEMODULE += libfixmath
USEMODULE += xtimer
USEMODULE += test_utils_interactive_sync
TEST_ON_CI_WHITELIST += all

View File

@ -31,8 +31,8 @@
#include <stdio.h>
#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();

View File

@ -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.')