Skip to content
Snippets Groups Projects
Commit 8b005388 authored by Martine Lenders's avatar Martine Lenders Committed by GitHub
Browse files

Merge pull request #7756 from haukepetersen/opt_test_addtesttarget

tests: added some more pexpect scripts
parents 2823ba35 d9512179
No related branches found
No related tags found
No related merge requests found
......@@ -4,3 +4,6 @@ include ../Makefile.tests_common
USEMODULE += xtimer
include $(RIOTBASE)/Makefile.include
test:
tests/01-run.py
#!/usr/bin/env python3
# Copyright (C) 2017 Freie Universität Berlin
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import os
import sys
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
import testrunner
def testfunc(child):
child.expect_exact("Start.")
child.expect('\+ bitarithm_msb: \d+ iterations per second')
child.expect('\+ bitarithm_lsb: \d+ iterations per second')
child.expect('\+ bitarithm_bits_set: \d+ iterations per second')
child.expect_exact("Done.")
if __name__ == "__main__":
sys.exit(testrunner.run(testfunc, timeout=30))
......@@ -12,3 +12,6 @@ USEMODULE += xtimer
DISABLE_MODULE += auto_init
include $(RIOTBASE)/Makefile.include
test:
tests/01-run.py
#!/usr/bin/env python3
# Copyright (C) 2017 Freie Universität Berlin
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import os
import sys
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
import testrunner
def testfunc(child):
child.expect_exact("Testing Bloom filter.")
child.expect_exact("m: 4096 k: 8")
child.expect("adding 512 elements took \d+ms")
child.expect("checking 10000 elements took \d+ms")
child.expect("\d+ elements probably in the filter.")
child.expect("\d+ elements not in the filter.")
child.expect(".+ false positive rate.")
child.expect_exact("All done!")
if __name__ == "__main__":
sys.exit(testrunner.run(testfunc))
......@@ -4,3 +4,6 @@ include ../Makefile.tests_common
USEMODULE += xtimer
include $(RIOTBASE)/Makefile.include
test:
tests/01-run.py
#!/usr/bin/env python3
# Copyright (C) 2017 Freie Universität Berlin
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import os
import sys
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
import testrunner
def testfunc(child):
child.expect_exact("On-board button test")
index = child.expect([
r"\[FAILED\] no buttons available!",
r" -- Available buttons: \d+"
])
if index == 1:
child.expect_exact("[SUCCESS]")
if __name__ == "__main__":
sys.exit(testrunner.run(testfunc))
......@@ -24,3 +24,6 @@ USEMODULE += xtimer
USEMODULE += timex
include $(RIOTBASE)/Makefile.include
test:
tests/01-run.py
#!/usr/bin/env python3
# Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de>
# Copyright (C) 2016 Takuo Yonezawa <Yonezawa-T2@mail.dnp.co.jp>
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import os
import sys
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
import testrunner
def testfunc(child):
child.expect_exact("************ C++ condition_variable test ***********")
child.expect_exact("Wait with predicate and notify one ...")
child.expect_exact("Done")
child.expect_exact("Wait and notify all ...")
child.expect_exact("Done")
child.expect_exact("Wait for ...")
child.expect_exact("Done")
child.expect_exact("Wait until ...")
child.expect_exact("Done")
child.expect_exact("Bye, bye.")
child.expect_exact("******************************************************")
if __name__ == "__main__":
sys.exit(testrunner.run(testfunc))
......@@ -23,3 +23,6 @@ USEMODULE += cpp11-compat
USEMODULE += xtimer
include $(RIOTBASE)/Makefile.include
test:
tests/01-run.py
#!/usr/bin/env python3
# Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de>
# Copyright (C) 2016 Takuo Yonezawa <Yonezawa-T2@mail.dnp.co.jp>
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import os
import sys
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
import testrunner
def testfunc(child):
child.expect_exact("************ C++ mutex test ***********")
child.expect_exact("Lock and unlock ...")
child.expect_exact("Done")
child.expect_exact("Try_lock ...")
child.expect_exact("Done")
child.expect_exact("Bye, bye.")
child.expect_exact("*****************************************")
if __name__ == "__main__":
sys.exit(testrunner.run(testfunc))
......@@ -24,3 +24,6 @@ USEMODULE += xtimer
USEMODULE += timex
include $(RIOTBASE)/Makefile.include
test:
tests/01-run.py
#!/usr/bin/env python3
# Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de>
# Copyright (C) 2016 Takuo Yonezawa <Yonezawa-T2@mail.dnp.co.jp>
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import os
import sys
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
import testrunner
def testfunc(child):
child.expect_exact("************ C++ thread test ***********")
child.expect_exact("Creating one thread and passing an argument ...")
child.expect_exact("Done")
child.expect_exact("Creating detached thread ...")
child.expect_exact("Done")
child.expect_exact("Join on 'finished' thread ...")
child.expect_exact("Done")
child.expect_exact("Join on 'running' thread ...")
child.expect_exact("Done")
child.expect_exact("Testing sleep_for ...")
child.expect_exact("Done")
child.expect_exact("Testing sleep_until ...")
child.expect_exact("Done")
child.expect_exact("Swapping two threads ...")
child.expect_exact("Done")
child.expect_exact("Move constructor ...")
child.expect_exact("Done")
child.expect_exact("Bye, bye.")
child.expect_exact("******************************************")
if __name__ == "__main__":
sys.exit(testrunner.run(testfunc))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment