tests/pkg_cmsis-dsp: provide testscript

This commit is contained in:
Martine Lenders 2018-08-07 13:42:07 +02:00
parent 530b0239ee
commit ed0fbdeaa7
2 changed files with 20 additions and 0 deletions

View File

@ -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

View File

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