Skip to content
Snippets Groups Projects
Commit f90c69cf authored by Alexandre Abadie's avatar Alexandre Abadie
Browse files

tests/bench_runtime_coreapis: improve pexpect autotest

parent 4e7bfb65
No related branches found
No related tags found
No related merge requests found
...@@ -12,10 +12,21 @@ from testrunner import run ...@@ -12,10 +12,21 @@ from testrunner import run
# The default timeout is not enough for this test on some of the slower boards # The default timeout is not enough for this test on some of the slower boards
TIMEOUT = 30 TIMEOUT = 30
BENCHMARK_REGEXP = r"\s+{func}:\s+\d+us\s+---\s+\d*\.*\d+us per call\s+---\s+\d+ calls per sec"
def testfunc(child): def testfunc(child):
child.expect_exact('[SUCCESS]', timeout=TIMEOUT) child.expect_exact('Runtime of Selected Core API functions')
child.expect(BENCHMARK_REGEXP.format(func="nop loop"))
child.expect(BENCHMARK_REGEXP.format(func=r"mutex_init\(\)"))
child.expect(BENCHMARK_REGEXP.format(func="mutex lock/unlock"), timeout=TIMEOUT)
child.expect(BENCHMARK_REGEXP.format(func=r"thread_flags_set\(\)"))
child.expect(BENCHMARK_REGEXP.format(func="thread flags set/wait any"), timeout=TIMEOUT)
child.expect(BENCHMARK_REGEXP.format(func="thread flags set/wait all"), timeout=TIMEOUT)
child.expect(BENCHMARK_REGEXP.format(func="thread flags set/wait one"), timeout=TIMEOUT)
child.expect(BENCHMARK_REGEXP.format(func=r"msg_try_receive\(\)"))
child.expect(BENCHMARK_REGEXP.format(func=r"msg_avail\(\)"))
child.expect_exact('[SUCCESS]')
if __name__ == "__main__": if __name__ == "__main__":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment