example_test.py 663 B

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