example_test.py 709 B

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