1from __future__ import unicode_literals 2 3import re 4 5import ttfw_idf 6 7 8@ttfw_idf.idf_example_test(env_tag='8Mpsram') 9def test_examples_himem(env, extra_data): 10 11 dut = env.get_dut('himem', 'examples/system/himem') 12 dut.start_app() 13 14 mem = dut.expect(re.compile(r'esp_himem: Initialized. Using last \d+ 32KB address blocks for bank ' 15 r'switching on (\d+) KB of physical memory.'), timeout=30)[0] 16 17 dut.expect_all(re.compile(r'Himem has {}KiB of memory, \d+KiB of which is free. ' 18 r'Testing the free memory...'.format(mem)), 19 'Done!', 20 timeout=10) 21 22 23if __name__ == '__main__': 24 test_examples_himem() 25