2020-04-22 14:46:23 +00:00
|
|
|
from __future__ import unicode_literals
|
2021-01-26 02:49:01 +00:00
|
|
|
|
2020-04-22 14:46:23 +00:00
|
|
|
import re
|
2021-01-26 02:49:01 +00:00
|
|
|
|
2020-04-22 14:46:23 +00:00
|
|
|
import ttfw_idf
|
|
|
|
|
|
|
|
|
2020-05-13 06:11:39 +00:00
|
|
|
@ttfw_idf.idf_example_test(env_tag='8Mpsram')
|
2020-04-22 14:46:23 +00:00
|
|
|
def test_examples_himem(env, extra_data):
|
|
|
|
|
|
|
|
dut = env.get_dut('himem', 'examples/system/himem')
|
|
|
|
dut.start_app()
|
|
|
|
|
|
|
|
mem = dut.expect(re.compile(r'esp_himem: Initialized. Using last \d+ 32KB address blocks for bank '
|
|
|
|
r'switching on (\d+) KB of physical memory.'), timeout=30)[0]
|
|
|
|
|
|
|
|
dut.expect_all(re.compile(r'Himem has {}KiB of memory, \d+KiB of which is free. '
|
|
|
|
r'Testing the free memory...'.format(mem)),
|
|
|
|
'Done!',
|
|
|
|
timeout=10)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
test_examples_himem()
|