Merge pull request #9725 from miri64/tests/enh/pkg_cmsis-dsp-testscript

tests/pkg_cmsis-dsp: provide testscript
This commit is contained in:
Joakim Nohlgård 2018-10-27 02:39:32 +02:00 committed by GitHub
commit 21efb20184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -1,6 +1,7 @@
BOARD ?= samr21-xpro BOARD ?= samr21-xpro
include ../Makefile.tests_common include ../Makefile.tests_common
TEST_ON_CI_WHITELIST += all
USEPKG += cmsis-dsp USEPKG += cmsis-dsp
BOARD_WHITELIST := \ BOARD_WHITELIST := \
@ -35,3 +36,6 @@ BOARD_WHITELIST := \
# #
include $(RIOTBASE)/Makefile.include 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))