From ed0fbdeaa70c9d0c03b00346ece1a7652e4952c9 Mon Sep 17 00:00:00 2001 From: Martine Lenders <m.lenders@fu-berlin.de> Date: Tue, 7 Aug 2018 13:42:07 +0200 Subject: [PATCH] tests/pkg_cmsis-dsp: provide testscript --- tests/pkg_cmsis-dsp/Makefile | 4 ++++ tests/pkg_cmsis-dsp/tests/01-run.py | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100755 tests/pkg_cmsis-dsp/tests/01-run.py diff --git a/tests/pkg_cmsis-dsp/Makefile b/tests/pkg_cmsis-dsp/Makefile index be99ea135b..51ca6aea4e 100644 --- a/tests/pkg_cmsis-dsp/Makefile +++ b/tests/pkg_cmsis-dsp/Makefile @@ -1,6 +1,7 @@ BOARD ?= samr21-xpro include ../Makefile.tests_common +TEST_ON_CI_WHITELIST += all USEPKG += cmsis-dsp BOARD_WHITELIST := \ @@ -35,3 +36,6 @@ BOARD_WHITELIST := \ # include $(RIOTBASE)/Makefile.include + +test: + $(CURDIR)/tests/01-run.py diff --git a/tests/pkg_cmsis-dsp/tests/01-run.py b/tests/pkg_cmsis-dsp/tests/01-run.py new file mode 100755 index 0000000000..d06bb83679 --- /dev/null +++ b/tests/pkg_cmsis-dsp/tests/01-run.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +import os +import sys + + +def testfunc(child): + child.expect(r"dsp: 0\.903941\d{3}") + child.expect_exact("reference: 0.903941793931839") + child.expect(r"diff: 0.000000[01]\d{2}") + + +if __name__ == "__main__": + sys.path.append(os.path.join(os.environ['RIOTTOOLS'], 'testrunner')) + from testrunner import run + sys.exit(run(testfunc)) -- GitLab