example_test.py 727 B

123456789101112131415161718192021
  1. from __future__ import print_function
  2. import ttfw_idf
  3. @ttfw_idf.idf_example_test(env_tag='Example_GENERIC', target=['esp32', 'esp32c3'])
  4. def test_examples_system_console(env, extra_data):
  5. dut = env.get_dut('console_example', 'examples/system/console', app_config_name='history')
  6. print('Using binary path: {}'.format(dut.app.binary_path))
  7. dut.start_app()
  8. dut.expect('Command history enabled')
  9. env.close_dut(dut.name)
  10. dut = env.get_dut('console_example', 'examples/system/console', app_config_name='nohistory')
  11. print('Using binary path: {}'.format(dut.app.binary_path))
  12. dut.start_app()
  13. dut.expect('Command history disabled')
  14. if __name__ == '__main__':
  15. test_examples_system_console()