example_test.py 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. from __future__ import unicode_literals
  2. import re
  3. import ttfw_idf
  4. @ttfw_idf.idf_example_test(env_tag='Example_GENERIC', target=['esp32', 'esp32c3'])
  5. def test_examples_efuse(env, extra_data):
  6. dut = env.get_dut('efuse', 'examples/system/efuse')
  7. dut.start_app()
  8. dut.expect_all(re.compile(r'example: Coding Scheme (3/4)|(NONE)|(REPEAT)|(RS \(Reed-Solomon coding\))'),
  9. 'example: read efuse fields',
  10. re.compile(r'example: 1. read MAC address: {}'.format(r':'.join((r'[0-9a-f]{2}',) * 6))),
  11. 'example: 2. read secure_version: 0',
  12. 'example: 3. read custom fields',
  13. 'example: module_version = 0',
  14. 'example: device_role = None',
  15. 'example: setting_1 = 0',
  16. 'example: setting_2 = 0',
  17. 'example: custom_secure_version = 0',
  18. 'example: This example does not burn any efuse in reality only virtually',
  19. 'example: Write operations in efuse fields are performed virtually',
  20. 'example: write custom efuse fields',
  21. 'efuse: Virtual efuses enabled: Not really burning eFuses',
  22. 'example: module_version = 1',
  23. 'example: device_role = Slave',
  24. 'example: setting_1 = 3',
  25. 'example: setting_2 = 4',
  26. 'example: custom_secure_version = 5',
  27. 'example: Done',
  28. timeout=30)
  29. if __name__ == '__main__':
  30. test_examples_efuse()