Merge pull request #7353 from aabadie/thread_flood_typo
tests/thread_flood: improve test output
This commit is contained in:
commit
60f4721855
@ -6,4 +6,4 @@ DISABLE_MODULE += auto_init
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
test:
|
||||
tests/test_thread.py
|
||||
tests/01-run.py
|
||||
|
||||
@ -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;
|
||||
|
||||
15
tests/thread_flood/tests/01-run.py
Executable file
15
tests/thread_flood/tests/01-run.py
Executable 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))
|
||||
@ -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')
|
||||
Loading…
x
Reference in New Issue
Block a user