tests/malloc: increase timeout, for larger BOARDs

The test timeouts on nucleo-f767zi.
This commit is contained in:
Francisco Molina 2020-10-07 16:54:24 +02:00
parent 31ce4ca406
commit 2ddd369ce9
No known key found for this signature in database
GPG Key ID: 3E94EAC3DBDEEDA8

View File

@ -9,6 +9,10 @@
import sys import sys
from testrunner import run from testrunner import run
# For BOARD's with large amount of RAM allocating all chunks takes longer
# than 10s
ALLOCATION_TIMEOUT = 20
def testfunc(child): def testfunc(child):
child.expect(r'CHUNK_SIZE: (\d+)\r\n') child.expect(r'CHUNK_SIZE: (\d+)\r\n')
@ -19,7 +23,8 @@ def testfunc(child):
for _ in range(number_of_tests): for _ in range(number_of_tests):
child.expect(r"Allocated {} Bytes at 0x[a-z0-9]+, total [a-z0-9]+\r\n" child.expect(r"Allocated {} Bytes at 0x[a-z0-9]+, total [a-z0-9]+\r\n"
.format(chunk_size)) .format(chunk_size))
child.expect(r'Allocations count: (\d+)\r\n') child.expect(r'Allocations count: (\d+)\r\n',
timeout=ALLOCATION_TIMEOUT)
allocations = int(child.match.group(1)) allocations = int(child.match.group(1))
assert allocations > 0 assert allocations > 0
if initial_allocations == 0: if initial_allocations == 0: