example_test.py 696 B

12345678910111213141516171819202122
  1. #!/usr/bin/env python
  2. from __future__ import division
  3. from __future__ import print_function
  4. from __future__ import unicode_literals
  5. import ttfw_idf
  6. @ttfw_idf.idf_example_test(env_tag="Example_GENERIC", target=['esp32', 'esp32s2'], ci_target=['esp32'])
  7. def test_examples_hello_world(env, extra_data):
  8. app_name = 'hello_world'
  9. dut = env.get_dut(app_name, "examples/get-started/hello_world")
  10. dut.start_app()
  11. res = dut.expect(ttfw_idf.MINIMUM_FREE_HEAP_SIZE_RE)
  12. if not res:
  13. raise ValueError('Maximum heap size info not found')
  14. ttfw_idf.print_heap_size(app_name, dut.app.config_name, dut.TARGET, res[0])
  15. if __name__ == '__main__':
  16. test_examples_hello_world()