Merge pull request #7353 from aabadie/thread_flood_typo

tests/thread_flood: improve test output
This commit is contained in:
Hauke Petersen 2017-10-25 14:50:07 +02:00 committed by GitHub
commit 60f4721855
4 changed files with 18 additions and 11 deletions

View File

@ -6,4 +6,4 @@ DISABLE_MODULE += auto_init
include $(RIOTBASE)/Makefile.include
test:
tests/test_thread.py
tests/01-run.py

View File

@ -36,7 +36,7 @@ int main(void)
{
kernel_pid_t thr_id = KERNEL_PID_UNDEF;
puts("Start spawning\n");
puts("[START] Spawning threads");
do {
thr_id = thread_create(
dummy_stack, sizeof(dummy_stack),
@ -46,7 +46,7 @@ int main(void)
} while (-EOVERFLOW != thr_id);
if (-EOVERFLOW == thr_id) {
puts("Thread creation successful aborted\n");
puts("[SUCCESS] Thread creation successfully aborted");
}
return 0;

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
import os
import sys
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
import testrunner
def testfunc(child):
child.expect_exact(u'[START] Spawning threads')
child.expect_exact(u'[SUCCESS] Thread creation')
if __name__ == "__main__":
sys.exit(testrunner.run(testfunc))

View File

@ -1,8 +0,0 @@
#!/usr/bin/python
import pexpect
term = pexpect.spawn("make term")
term.expect('Start spawning\r\n')
term.expect('Thread creation successful aborted\r\n')